Comments (5)
Hi @derMaaster,
We use NLog to log FixAntenna operations. You could create an NLog config and put it in the folder with Antenna to receive more information about what is going on.
Here is an example of the config from our repo:
https://github.com/epam/fix-antenna-net-core/blob/main/FixAntenna/NetCore/NLog.config
It will log to the console.
Here is the NLog documentation you can use to configure logging into a file:
https://github.com/nlog/NLog/wiki/File-target
from fix-antenna-net-core.
Thanks @Viktar-Tserashchuk , please confirm - FixAntenna has NLog "built in" and that is its logging functionality, and when I put NLog.config into the same base folder as say fixengine.properties, that will overwrite the basic settings of FixAntenna's logging ? (if I am using the nuget package...)
from fix-antenna-net-core.
When I move from the nuget packge to referencing Epam.FixAntenna.NetCore.csproj and change the NLog file there to:
`
<variable name="conLayout" value="[${date:format=yyyy-MM-dd HH\:mm\:ss.fff}] [${level:uppercase=true:padding=5}] [${threadname}] [${logger:shortName=true}]: ${message} ${exception:innerFormat=Message,StackTrace}"/>
<targets>
<target name="logFile" xsi:type="File"
layout="${conLayout}"
fileName="${basedir}/logs/logfile.txt"
keepFileOpen="true"
encoding="utf-8" />
</targets>
<rules>
<logger name="Ridd*" minlevel="Trace" maxlevel="Debug" writeTo="logFile" final="true" />
</rules>
`
I dont get different output in appl/logs/ ...
Tried NLog's simple example too:
`
<targets>
<target name="file" xsi:type="File"
layout="${longdate} ${logger} ${message}${exception:format=ToString}"
fileName="${basedir}/logs/logfile.txt"
keepFileOpen="true"
encoding="utf-8" />
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="file" />
</rules>
`
from fix-antenna-net-core.
I would put nlog.config into the folder with your binary files. FixAntenna uses it only for the engine logs.
.in/.out files are not affected by any changes in nlog.config.
Your config file will work if you surround it with proper tags:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
</nlog>
and change <logger name="Ridd*"
to be <logger name="*"
Also, it's better to skip setting maxlevel="Debug"
as it excludes the info level messages.
The full config that worked for me looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variable name="conLayout" value="[${date:format=yyyy-MM-dd HH\:mm\:ss.fff}] [${level:uppercase=true:padding=5}] [${threadname}] [${logger:shortName=true}]: ${message} ${exception:innerFormat=Message,StackTrace}"/>
<targets>
<target name="logFile" xsi:type="File"
layout="${conLayout}"
fileName="${basedir}/logs/logfile.txt"
keepFileOpen="true"
encoding="utf-8" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logFile" final="true" />
</rules>
</nlog>
from fix-antenna-net-core.
Thanks @Viktar-Tserashchuk
I did have proper tags, I just did not post those with the rest of the example - apologies for the confusion. Turns out I had the base directory wrong - the debug files were there, with the binaries.
Once again - I appreciate the support and help you guys provide.
from fix-antenna-net-core.
Related Issues (15)
- Reject message (35=3) does not include tag 371 for troubleshooting HOT 5
- FieldNotFoundException - tag 271 not in message (35=x) where 269 = q HOT 26
- Loss of data integrity with threading from OnNewMessage() HOT 4
- Make IExtendedFixSessionListener public
- Support FixMessage.Parse HOT 2
- .Net Standard 2.0 with .Net Framework 4.7.2
- Net (Wrapper) migration to .Net Core
- Time drift when running on AWS HOT 1
- ByteBuffer.Add(char) is Encoding dependant HOT 3
- ByteArrayMessageStorage.Add: Suspicious code HOT 11
- Question about behavior when param forceSeqNumReset set to OneTime HOT 2
- Datetime values parser HOT 6
- .editorconfig file makes the solution unbuildable in Visual Studio HOT 1
- Epam.FixAntenna.Constants does not exist. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fix-antenna-net-core.