4.5 Logging

4.5.1 Locating log files

There are two log files available:

  • <install_dir>/sessionserver/sessionserver.log - the log file for the session server application.

  • <install_dir>/sessionserver/container.log- the log file for the container that hosts the Host Access for the Cloud application.

4.5.2 Configuring log rotation

You can configure log rotation by editing these values in <install_dir>\sessionserver\microservices\sessionserver\service.yml:

LOGGING_FILE_MAXSIZE
LOGGING_FILE_MAXHISTORY

4.5.3 Setting logging levels

There are various types of logging levels you can use to produce different types of information. You can configure logging levels in <install_dir>\sessionserver\microservices\sessionserver\service.yml.

NOTE:Lines in service.yml must be indented using spaces.

Use the following format to set logging levels:

- name: logging.level.<logger>
  value: "<log level>"

Where <logger> is the name of the logger to adjust and <log level> is one of the following:

  • Trace - designates finer-grained informational events than Debug

  • Debug - designates fine-grained informational events that are most useful to debug an application.

  • Info -designates informational messages that highlight the progress of the application at coarse-grained level.

  • Warn - designates potentially harmful situations.

  • Error - designates error events that might still allow the application to continue running.

  • Fatal - designates very severe error events that will presumably lead the application to terminate.

NOTE:You must restart the session server after any changes to service.yml.

4.5.4 Web client to session server logging

While the browser provides a basic mechanism for logging to its JavaScript console, the Web Client extends this capability and, with some configuration, you can log events to the session server for viewing by an administrator.

By default, nothing is logged to the session server. You must set the log level, following the instructions below, in order to enable this feature.

The available log levels are: debug, info, warn, error, or off. The default log level is off.

Adjusting the logging level for all Web client users

To adjust the logging level for all Web clients, add the following entry to <install_dir>\sessionserver\microservices\sessionserver\service.yml

- name: <logger>
  value: "<log level>"

Where <logger> is:

logging.level.com.microfocus.zfe.webclient.core.handler.ClientLoggingHandler-webclient

NOTE:Use caution when increasing the logging level for all Web Client users in a production environment due to a potential increase in network traffic.

Adjusting the logging level for an individual user

There are two options for adjusting the logging level for individual users:

To temporarily adjust the logging level for a particular user’s Web client instance without requiring a session server restart, instruct the user to add the following URL parameter when loading the Web client in their browser:

https://mysessionserver.com:7443/?log=<log level>

To adjust the logging level for an individual user without requiring them to make changes, add the following entry to service.yml:

- name: <logger>
  value: "<log level>"

Where <logger> is:

logging.level.com.microfocus.zfe.webclient.core.handler.ClientLoggingHandler-webclient-<username>

Where <username> is the user name of the person whose logging levels you are adjusting.

NOTE:Logging based on a username requires an authentication mode that involves usernames.