Description:

The logging level of a CoolOrange product should be changed or the log file should be extracted.


Changing the Log-Level:

The first step to change the log-level is to locate the log-settings file for the product by navigating to the directory for the respective Product.

List of paths for the log-settings file for the products:

  • PowerVault: "C:\Program Files\coolOrange\Modules\powerVault"

  • PowerJobs: "C:\Program Files\coolOrange\powerJobs"

  • PowerEvents: "C:\Program Files\coolOrange\Modules\powerEvents"

  • PowerGate Client: "C:\Program Files\coolOrange\Modules\powerGate"

  • PowerGate Server: "C:\Program Files\coolOrange\powerGateServer"


The second step is to locate the log-settings file in the directory.

List of log-settings files for the products:

  • PowerVault: "powerVault.log4net"
  • PowerJobs: "powerJobs.log4net"
  • PowerEvents: "powerEvents.log4net"
  • PowerGate Client: "powerGate.log4net"
  • PowerGate Server: "powerGateServer.log4net"


Our products use Log4Net to log information. There are several different levels of logging available in Log4Net in the following order (See the links at the end for more details):

  • ALL
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
  • OFF


powerGate has the special logging level "TRAFFIC" located between "INFO" and "DEBUG". In this level all requests and responses are logged.


Open the log-settings file with a text editor and search for the following block near the end of the file:

<root>
    <level value="INFO" />
    <appender-ref ref="FileAppender"/>
    <appender-ref ref="ColoredConsoleAppender" />
</root>


You can now change the log-level of the product by changing the value attribute of the level element. If you want to change it to DEBUG for example the code block should look similar to the following.

<root>
  <level value="DEBUG" />
  <appender-ref ref="FileAppender"/>
  <appender-ref ref="ColoredConsoleAppender" />
</root


Then save the file and restart the application and the new log level will be used.

To have a clean log file it is recommended to rename or remove the old log file so a new file can be created.



PowerEvents:

In powerEvents a range filter is used. To change the logging level in powerEvents search for following lines.

<filter type="log4net.Filter.LevelRangeFilter">
      <levelMin value="INFO" />
      <levelMax value="FATAL" />
    </filter>


To change the logging level to for the logfile to e.g. DEBUG, change the minimum value:

<filter type="log4net.Filter.LevelRangeFilter">
      <levelMin value="DEBUG" />
      <levelMax value="FATAL" />
    </filter>



PowerGateServer:

The PowerGate does not have a level element in the root element of its log4net config file. But you can go to the following section to change the EventViewer log level:

<appender name="EventLogAppender"
        type="log4net.Appender.EventLogAppender" >
    <param name="LogName"
         value="cOpowerGateServer" />
    <param name="ApplicationName"
         value="powerGateServer-Service" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="[%logger] - %message%newline" />
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
      <levelMin value="DEBUG" />
      <levelMax value="FATAL" />
    </filter>
</appender>

Here you can change the levelMin element value to the desired log level. The levelMax element is by default already set to 'FATAL' (the highest log level)



Extracting the log files:

The log files for the products are located in the following directories:

  • PowerVault: "C:\Users\<User name>\AppData\Local\coolOrange\powerVault\Logs"

  • PowerJobs: "C:\Users\<User name>\AppData\Local\coolOrange\powerJobs\Logs"

  • PowerEvents: "C:\Users\<User name>\AppData\Local\coolOrange\powerEvents\Logs"

  • PowerGate Client: "C:\Users\<User name>\AppData\Local\coolOrange\powerGate\Logs"

  • PowerGate Server: See below

You can copy-and-paste the log file to the desired location.


PowerGate Server:

Due to the fact that powerGate Server runs as a service, it does not log to a file but to the Windows EventViewer the log can be accessed via the e.g. "PowerGateServer 19.0 Logs" shortcut in the start menu or directly via the Windows EventViewer under "Applications and Services Logs" and then "cOpowerGateServer". Have a look at the Links section for a guide on how to extract logs from powerGateServer.


Remarks:

  • If you are asked by our support team to send a 'clean log file' you should remove or rename the current log file so a new one is created by the product.
  • Some log levels can have an impact at performance due to heavy logging. For example setting the log level DEBUG is only recommended when it was requested by the support team and should be changed after the log file has been exported.
  • There is a more detailed page dedicated to logging for most of our products on the product Wiki under "Product name" -> "Logging"

Links: