Skip to main content
Version: 6.14.0

Logging Configuration

By default the Portal Dedicated logs to /var/log/portal/portal.log with default settings of:

  • Maximum single file size: 5 MB
  • Days to retain log files: 30
  • Total size of all log files* : 2 GB
  • Rolled files are compressed with name pattern: mc.log.yyyy-MM-dd.%i.gz (%i being an index that starts at 0)
  • Log level: INFO

* This is done asynchronously and also depends on the maximum file size value. Set at around 75% of the value not to be exceeded.


Create logging directory​

The desired logging directory must be manually created:

sudo mkdir --parent /var/log/portal
sudo chown portal:portal /var/log/portal
sudo chmod 755 /var/log/portal

Setting logging location​

To change the default logging location update logging.file.name in application.properties.

For example:

logging.file.name=/tmp/portal.log

Setting global logging level​

To change the default logging level of INFO update logging.level.root in application.properties with a value from: TRACE, DEBUG, INFO, ERROR

For example:

logging.level.root=DEBUG

Component-specific logging​

You can configure logging levels for specific components or packages without changing the global logging level. This is useful for troubleshooting specific features or integrations.

Tenable Integration logging​

To enable detailed logging for Tenable report generation and troubleshooting, add the following configuration to your application.properties file:

logging.level.portal.domain.integration.tenable.api.TenableApi=DEBUG
logging.level.portal.domain.integration.tenable.TenableService=DEBUG
logging.level.portal.domain.integration.tenable.api.cache.CachingTenableApiService=DEBUG
logging.level.portal.core.spring.http.client.PerformanceLoggingHttpRequestInterceptor=TRACE
logging.level.portal.core.spring.http.client.RequestLoggingHttpRequestInterceptor=TRACE

The first two flags (TenableApi and TenableService) can be set to either DEBUG or TRACE, with TRACE providing more detailed information about the Tenable integration operations.

Logging settings​

All other logging settings can be edited in the Logback configuration file logging.xml file found in the root of the Portal Dedicated installation. See Logback documentation for details