reading Guid column

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

reading Guid column

Bharani
Dear all,
we are using NLog and we have a guid column in the logs. we are unable to read this guid column (E069EC6C-81A8-2D10-19B9-9CD5CC555304) in log4view. Following is a sample line in the log

2018-02-17 01:06:10.1661 E069EC6C-81A8-2D10-19B9-9CD5CC555304 Migration.Updater.StatisticsDbUpdateJob.Run Migration.Updater.StatisticsDbUpdateJob.RetrieveItemsFromWebserice 0 INFO Setting Items additional info for e069ec6c-81a8-2d10-19b9-9cd5cc555304

i'm trying to use the following pattern in log4view
${longdate} ${event-properties:item=RoomId:format=String} ${callsite} ${category} ${ndc} ${threadid} ${level} ${message}

This is our pattern in the appconfig
layout="${longdate} ${event-properties:item=RoomId} ${var:category} ${callsite} ${var:taskid} ${level:uppercase=true} ${message}"
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Philipp Lauchner
Administrator
Dear Bharani,

thank you for reporting this issue, you indeed found a bug. We will include the fix in the next update we plan to roll out next week.

Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Bharani
Thank You very much Philipp.
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Rico
One more question.
I currently only have a trial version and this bug is kind of preventing me to buy. Can I install and try the bugfix even though my trial expires before the bugfix is published?
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Rico
How do I in general use event-properties in the configuration. Can you point me to the right part of the documentation? Thanks
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Philipp Lauchner
Administrator
In reply to this post by Bharani
Dear Bharani,

We just released a new version fixing your problem. You can download version V2 1.1.0 here.

In the new version just use the same pattern as you use in your logging application (${longdate} ${event-properties:item=RoomId} ${var:category} ${callsite} ${var:taskid} ${level:uppercase=true} ${message}).

Mit freundlichen Grüßen / Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Philipp Lauchner
Administrator
In reply to this post by Rico
Dear Rico,

once the trial expires Log4View continues to work as a community edition with some limitations (only one receiver at a time allowed, no database receiver etc. You can find more info about that here). So yes, you can always try the latest version for non commercial use and with the mentioned limitations.

Regarding the event-properties: Do you need help writing context properties in you logging application, or to show them in Log4View? In Log4View just use the same pattern string as you use to create the log file.


Mit freundlichen Grüßen / Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Rico
Thanks for the answer. We received a  temporary license key to test your product further. Its great by the way. 

My question regarding the event properties was mostly about having them read by Log4View. I know how to define them and get them into the log view. Not a problem. But getting them to show up in log4view was the issue. I hope it was only because of the bug with the guid. I am wondering what predefined columns are used for what purpose and what colum in which format we have to use for custom event properties. Does this make it a bit more clear?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Philipp Lauchner
Administrator
Dear Rico,

thanks for the clarification. This problem was indeed the bug reported in this thread. The predefined columns relate to the default layout renderers (https://github.com/nlog/nlog/wiki/Layout-Renderers).
Some have different names to comply with items provided by the xml format or the items used by log4net (e.g. a callsite element will be split up into the class and method column).

Additional columns will be generated by Log4View for items that have custom names and values configured, e.g. via the event-properties or var item.
But you are right, a bit more documentation in this area sounds like a good idea. We will provide this in future versions.
Is a table listing all supported pattern elements of NLog and log4view and their corresponding columns what you have in mind?


Mit freundlichen Grüßen / Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Rico Saupe
Thanks Philipp

Now i got a clearer picture. Documentation on that part would be great. Do you have actual documentation about that? Something like: if you have that layout in your configuration your log4view config must look like that...

Thanks,
Rico
Reply | Threaded
Open this post in threaded view
|

Re: reading Guid column

Philipp Lauchner
Administrator
Dear Rico,

you can open Log4Views documentation via Help->Log4View Help or by pressing the F1 key.
Yet a documentation on the individual pattern fields and their columns does not yet exist.

Ideally if you use a pattern layout when logging you just use the same pattern string in Log4View to read the output. We are currently working on adding support for more layout pattern elements to Log4View.

If you encounter a layout pattern or logfiles that cannot be parsed by Log4View, fell free to create a new forum post or send us a mail. In both cases just add the used pattern and two lines of exemplary log output you try to read and we will take a look into it.


Mit freundlichen Grüßen / Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support