Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log as JSON in log4net

Tags:

json

log4net

I'm trying to figure out the best way to write all of our logs as a sigle line of JSON using log4net. I want to be able to configure any appender to use it. Any help would be appreciated.

like image 342
Micah Avatar asked Dec 03 '12 16:12

Micah


1 Answers

If you're looking for log4net JSON, see log4net.ext.json. I'm the developer. The Readme.md covers the first steps on how to get it up and running. It is used in place of a layout so it can be plugged into any log4net appender that takes a layout.

like image 109
Robert Cutajar Avatar answered Nov 09 '22 08:11

Robert Cutajar