Log2Console is a development utility, which provides an easy-to-use UI, allowing you to filter and search for log messages from the following logging services: Log4Net, Log4j and NLog. It can directly receive log events locally or remotely, or read them from a log file.

Configuration

The Log2Console utility can be downloaded from GitHub repos.

Note
It will also be included into the Cinegy Archive Service installer starting from version 11.

This document describes logging over UDP via Log2Console. This should be configured on both the CAS and Log2Console sides.

CAS

Important
To work with the Log2Console utility, please make sure that the Cinegy Archive Service is installed. Refer to the Cinegy Archive Service Manual for detailed description of the CAS installation and configuration.

In order to enable viewing logs, the relevant parameters should be configured on the Cinegy Archive Service side first. This can be done via the CinegyServerWSHost.exe.config file located in the Cinegy Archive Service installation folder.

A sample of the log4net section in the configuration file structure is shown below:

<?xml version="1.0" encoding="utf-8"?>
<configuration>...
  <log4net>
    <appender name="udpAppender7071" type="log4net.Appender.UdpAppender">
      <param name="RemoteAddress" value="127.0.0.1"/>
      <param name="RemotePort" value="7071"/>
      <filter type="log4net.Filter.LevelRangeFilter">
        <levelMin value="INFO"/>
        <levelMax value="FATAL"/>
      </filter>
      <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
      </layout>
    </appender>
    <root>
      <appender-ref ref="udpAppender7071"/>
      <level value="ALL"/>
    </root>
    <logger>...
    </logger>
  </log4net>
  <runtime>...
  </runtime>
</configuration>

where:

  • appender – a log target responsible for logging events output. An example above shows how to configure the UdpAppender to send events to a RemoteAddress on the specified RemotePort.

    Important
    Use of multiple appenders for receiving logs from different instances is supported. Please refer to the article for detailed information about appender types and their configuration.
    Note
    In the example above, RemoteAddress is set to 127.0.0.1 by default. There is no need to change this value if Log2Console is installed on the local machine. Otherwise, the value has to be changed to the Log2Console host IP.
    Note
    The default RemotePort is 7071 and it must be opened in Windows Firewall.
  • appender-ref – a reference to an appender. Its value must be identical to the referenced appender name value.

Note
Please note, if the code with appender-ref is hidden using comments, you must uncomment it first.

Log2Console

Use the Log2Console.exe file in the Log2Console folder to start the utility. The following dialog informs you that Receivers must be configured first:

configuration_message

Press "OK". The "Receivers" dialog box appears:

receivers_empty

Using the "Add…​" drop-down menu, select the "UDP (IP v4 and v6)" receiver:

receivers_list

The default UDP receiver configuration will be displayed:

UDP_receiver_config

Here set the "UDP Port Number" parameter identical to the "RemotePort" value specified in the CinegyServerWSHost.exe.config file.

Press "OK" to return to the main Log2Console window.

Output log messages will be displayed in a table view as it is shown below:

main_with_logs

Use the drop-down list to define the level for logs to be displayed:

log_levels

Messages of different log levels are shown in different colors to make the work with them more convenient:

log2console_coloring

Default log level colors, as well as other interface settings can be modified in the "Settings" dialog:

settings_dialog