Hi,
I have a 3 issues, after configuring the pattern:
NLog layout:
${time:format=HH:mm:ss} ${logger} ${callsite:className=false:fileName=false:includeSourcePath=false:methodName=true:includeNamespace=false:cleanNamesOfAsyncContinuations=true} : ${LEVEL}, ${message:format=tostring} ${exception:format=tostring}
Didn’t work, so I changed it to:
${time:format=HH:mm:ss} ${logger} ${callsite} : ${LEVEL}, ${message}
The app doesn’t shows method names, for workaround I changes the callsite element to exception element and it worked.
The workaround pattern:
${time:format=HH:mm:ss} ${logger} ${exception} : ${LEVEL}, ${message}
The second issue related to app that refuses to save a new added columns… (exceptions, methods and etc…)
The third issue is that all logs became to be errors after 12 PM (00:00), this is the most frustrating one.
Besides that I am very pleased from this great tool!!!
Thanks in advance.
Ulrich
June 19, 2018, 9:24am
2
Hi,
can you please send us a short sample log file to support@prosa.biz which shows the problem.
Ulrich
Ulrich
June 23, 2018, 12:16pm
3
Hi Dani,
your problem has mixed causes:
Your original NLog layout is not unambiguous. The problem are the last two elements: ${message:format=tostring} ${exception:format=tostring}
Message and exception are multiword elements and there is no unique separator between them. So how could Log4View know, where the message ends and the exception begins?
Insert a unique separator between message and exception (a string combination, that will never appear in any message), for example:
${time:format=HH:mm:ss} ${logger} ${callsite:className=false:fileName=false:includeSourcePath=false:methodName=true:includeNamespace=false:cleanNamesOfAsyncContinuations=true} : ${LEVEL}, ${message:format=tostring} ||| ${exception:format=tostring}
The parser engine in Log4View didn’t handle some elements in the right way. We have fixed this and the fix will be included in our next release.
If you want to try the fix, you can download a prerelease version of Log4View 1.2.2 here .
system
June 27, 2018, 11:46am
4
Guest on Nabble: Dani
Thanks
For the reply.
I fixed the exception element with ||| as you suggested.
What about the “callsite” and the 12 PM issues, I tried the new version you sent me still couldn’t make it work.
Thank in Advance!
Ulrich
June 27, 2018, 12:50pm
5
Hi Dani,
using Log4View 1.2.2, we could read the log file you sent us with the this log pattern:
${time:format=HH:mm:ss} ${logger} ${callsite:className=false:fileName=false:includeSourcePath=false:methodName=true:includeNamespace=false:cleanNamesOfAsyncContinuations=true} : ${LEVEL}, ${message:format=tostring}
Please make sure, that in the receiver settings, the logging framework is set to “NLog”.
Let me know, if this works for you with 1.2.2.
Ulrich
system
June 27, 2018, 1:04pm
6
Guest on Nabble: Dani
Looks like working now, maybe related to Log4net vs NLog, the global layout for NLog is not being saved…
Thanks