How to Create Monitor Logs with Log4net
    • Dark
      Light
    • PDF

    How to Create Monitor Logs with Log4net

    • Dark
      Light
    • PDF

    Article Summary

    In order to troubleshoot effectively, our technical teams may need a detailed log of the ControlUp Monitor.
    The monitor machines do not automatically create log files, so you will need to manually initiate the creation of a log file. We use a third-party logger called log4net which allows you to log the activity of the monitor in different log levels.

    Create the Log File Manually

    1. Navigate to the ControlUp Monitor folder, e.g., C:\Program Files\Smart-X\ControlUpMonitor\Version 8.7.0.613
    2. Download and copy the file cuMonitor.exe.log4net to the monitor directory.
    3. Right-click the monitor folder > Security. Add the NETWORK SERVICE user.
      image.png
    4. Assign Full control permission to the NETWORK SERVICE user.
      image.png
    5. You can now see a new file ControlUp.log.
      image.png
      If you want to change the file name you can edit the following value in the cuMonitor.exe.log4net file:
      <file value="ControlUp.log"/>
      

    Settings in Log4net File

    Set the Log Level

    You can set the log level (e.g., DEBUG, ERROR, WARN) by changing the following value.

    <root>
    <level value="DEBUG"/>
    <appender-ref ref="RollingFileAppender"/>
    </root>
    
    Information

    The debug level is a lower log level than the info level. This means that log statements written at the debug level are generally considered to be less important or severe than log statements written at the info level

    Set the Maximum File Size

    To change the file size, modify the value in the maximumFileSize key.

    <maximumFileSize value="50MB"/>
    

    Set Rollback Policy

    Define how many files are written after the maximum file size has been reached. You can find more information here.

    <maxSizeRollBackups value="5"/>
    

    Was this article helpful?