Skip to content

SHSE/LogWatch

Repository files navigation

LogWatch

Minimalistic viewer for NLog, Log4Net and others.

or download binaries

LogWatch allows you to view output from NLog and Log4Net loggers.

Features

  • 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

Sources

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.

Formats

The application supports the following log formats out of the box:

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.

TODO

  • documentation
  • custom log record properties

About

Minimalistic viewer for NLog, Log4Net and others.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published