Minimalistic viewer for NLog, Log4Net and others.
LogWatch allows you to view output from NLog and Log4Net loggers.
- Designed to handle large log files (hundreds of megabytes, it doesn't read all the data into memory)
- Live file streaming support (view files that are currently being updated by the logger)
- Built-in support for CSV and Log4J XML formats
- Automatic log format selection
- Receives log records via network
- Provides quick jump to a next Trace/Debug/Info/Warn/Error/Fatal record functionality
- Search using simple text search or regular expressions (press Ctrol+F to activate)
- Ability to define custom log parser using Lex syntax
LogWatch has built-in support for the following log sources:
- File source
- UDP source
When using file source LogWatch sets a monitor on the file and provides live updates on the records.
The application supports the following log formats out of the box:
- CSV format (with some limitations)
- Log4J XML format
- Custom parser (defined using Lex syntax)
LogWatch automatically determines format of the source.
CSV delimeter can be ;
or ,
. The log file must have header with some of the following feillds (case sensitive):
time
message
logger
level
exception
Here is an example configuration of CSV layout for NLog:
<target name="file" xsi:type="File" encoding="utf-8" fileName="mylog.log">
<layout xsi:type="CsvLayout">
<column name="time" layout="${longdate}" />
<column name="message" layout="${message}" />
<column name="logger" layout="${logger}" />
<column name="level" layout="${level}" />
<column name="exception" layout="${exception:format=ToString}" />
</layout>
</target>
Log4J XML is the default format for NLogViewer. Here is an example configuration for NLog:
<target name="viewer" xsi:type="NLogViewer" address="udp://127.0.0.1:13370" includeNLogData="true">
<parameter name="exception" layout="${exception:format=ToString}"/>
</target>
NLogViewer
sends records via UDP in Log4J XML format.
- documentation
- custom log record properties