Custom Columns Using Database Reciever

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

Custom Columns Using Database Reciever

mje147
I am having issues with the Column Chooser with the Database Receiver.

I would like to load custom database fields into the log4view Viewer.

Everything works fine when opening an XML log file with the custom property shown below.

<log4net:properties><log4net:data name="CustomProperty" value="CustomValue" </log4net:properties > …

A Column with the name "CustomProperty" becomes available in the Column Chooser. I want to be able to do the same thing, but using the Database Receiver instead.



Above is a screen shot of my database receiver settings. I want REMOTE_ADDR, DnnuserId, and TestTimeStamp to be available as columns in the grid. I have checked and the columns are being queried from the database, but I can't figure out how to view them from within log4view.

Do I need patterns?  I thought the timestamp would work without a pattern, but these columns do not show up in the column chooser. Any Idea?



Reply | Threaded
Open this post in threaded view
|

Re: Custom Columns Using Database Reciever

Philipp Lauchner
Administrator
Dear mje147,

you are right. To use a custom field in the db receiver, you have to set its parser type to Pattern and define it like a custom pattern property in log4net. Please use the pattern property{Your_Property_Name}.
In the following example a custom property has been logged to the column Prop and will be read in Log4View using the name Propertyname:





Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support