Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to enable logs, you can set the following parameters as environment variables or, when using as javaagent, add them as -Dsl.* parameters.
Both console output and file options are compatible and non-exclusive.

For logging into the console, add

Code Block
-Dsl.log.toConsole=true -Dsl.log.level=info [--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED]

For logging into a file, add

Code Block
-Dsl.log.toFile=true -Dsl.log.level=info -Dsl.log.folder=<path/with/permissions/> [--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED] [-Dsl.log.count=<value>] [-Dsl.log.limit=<arg>] [-Dsl.log.filename=<arg>]

Parameter

Description

sl.log.level

Sets the log level to one of the following: "off", "error", "warn", "info", "debug"

sl.log.toConsole

Set to true to enable log output to the console

sl.log.toFile

Set to true to enable log output to a file

sl.log.folder

Provide a folder to save the log files in

sl.log.filename

Provide the name of the log file

sl.log.count

Limit the number of log files to create. Default: 10

sl.log.limit

Limit the size of the log file in megabytes (MB). Default value is 10 (i.e. 10*1024 KB)

--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED

Special JVM parameter to allow logging in Java 9 and later in addition to -Dsl.log.* options above. 
If the option is not provided, the test listener will work as usual, but logging will not work.

...