Log2Console is a development utility which provides an easy-to-use UI allowing 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.
The Log2Console utility can be downloaded from GitHub repos.
|It will also be included into Cinegy Archive Service installer starting from version 11.|
This document describes logging over UDP via Log2Console. This should be configured on both CAS and Log2Console sides.
|To work with Log2Console utility, please make sure that Cinegy Archive Service is installed. Refer to the Cinegy Archive Service Manual for detailed description of CAS installation and configuration.|
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>
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. This value should be left without changes if Log2Console is installed on the local machine. Otherwise, the value should be changed to the Log2Console host IP.Note The default RemotePort is 7071 and it should be open in Windows Firewall.
appender-ref – a reference to an appender. Its value should be identical to the referenced appender name value.
|Please note, if code with appender-ref is hidden using comments, you should uncomment it first.|
Use the Log2Console.exe file in the Log2Console folder to start the utility. The following dialog informs you that receivers should be configured first:
Press "OK". The "Receivers" dialog box appears:
Press the "Add…" button and choose the "UDP (IP v4 and v6)" receiver from the drop-down list:
The default UDP receiver configuration will be displayed:
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:
Use the drop-down list to define the level for logs to be displayed:
Messages of different log levels are shown in different colors to make the work with them more convenient:
Default log level colors, as well as other interface settings can be modified in the "Settings" dialog: