Skip to main content Skip to complementary content

Qlik Logging Service

Warning noteDEPRECATED.
Beginning with the May 2021 release of Qlik Sense, the centralized logging system is no longer available for new installations. If you upgraded from a release earlier than May 2021, note that centralized logging is deprecated and will be removed in a future release. See Deprecation of Centralized Logging in Qlik Sense Enterprise on Windows for more information.

The Qlik Logging Service is used to centralize logging, which makes it easier for you to find the log that you are looking for.

When centralized logging (the Qlik Logging Service) is on, file logging is also on, by default. Log entries from the Qlik Sense services (repository, proxy, scheduler, and engine) are persisted in two locations – the existing log files and the centralized logging database. The legacy log files do not have any built-in file management to clear up hard disk space.

Although the Qlik Logging Service will be installed as a Windows service, you can use it directly as a command line tool to configure or change the database settings. The available commands are included in this topic, and the default installation location is %Program Files%\Qlik\Sense\Logging.

Information noteThe Qlik Logging Service does not support streaming messages to third-party tools or customers. You can view the log data in the Log Monitor.

Command line options

These are the available commands for the Qlik Logging Service.

Usage: Qlik.Logging.Service.exe <action> [<args>]

The following commands can be used to set up, update, or validate the logging database:

setup - creates the logging database and sets up roles and access permissions.

update - updates the connection string parameters for the logging database with user-provided values.

validate - validates connection string parameters from the configuration file and database connectivity.

archive - moves database entries to the archive table.

purge - removes (permanently) database entries from the archive table.

version - displays version information for the service.

help - displays help message.

Setting up the logging database

The setup command is typically used by the installer at the time of the Qlik Sense installation. The setup command creates the logging database and sets up access roles and required permissions.

Usage: Qlik.Logging.Service.exe setup [<options>]

Options

--hostname or -h (Required)

Name of the machine where the logging database is hosted.

--port or -p (Required)

Port number used to access the logging database.

--postgres_user or -u (Required)

PostgreSQL user name credentials required to create the logging database.

--postgres_pswd or -x (Required)

PostgreSQL password required to create the logging database.

--reader_pswd or -r (Required)

Password for qlogs_reader user role, used for reading logging database entries.

--writer_pswd or -w (Required)

Password for qlogs_writer user role, used for writing to the logging database.

--force or -f (Optional)

Drop the existing database and users, if present.

Updating the connection string parameters

The update command is used to modify the connection, the configuration settings of the logging database, or both.

Usage: Qlik.Logging.Service.exe update [<options>]

Information noteFor more information about updating the logging service after an upgrade, see How to set up the Qlik Sense Logging Service.

Options

--hostname or -h (Optional)

Name of the machine where the logging database is hosted.

--port or -p (Optional)

Port number used to access the logging database.

--reader_pswd or -r (Optional)

Password for qlogs_reader user role, used for reading logging database entries.

--writer_pswd or -w (Optional)

Password for qlogs_writer user role, used for writing to the logging database.

--archive_age or -a (Optional)

Sets value for archive age. The value is specified in days. Specify --hours to interpret archive age as hours, for example, --archive_age X --hours.

--purge_age or -q (Optional)

Sets value for purge age. The value is specified in days. Specify --hours to interpret purge age as hours, for example, --purge_age X --hours.

--file_logging or -f (Optional)

Switches on or off file logging. Valid values are 'on' or 'off'.

--database_logging or -d (Optional)

Switches on or off database logging. Valid values are 'on' or 'off'.

--maximum_db_size_in_gb or -s (Optional)

Sets value for maximum database size. The value is specified in GB. A value less than two (2) disables the functionality that limits the database size.

Validating the logging database connection

Usage: Qlik.Logging.Service.exe validate [<options>]

Options

None. The connection string is read from the logging configuration and is used to validate the state of the database and the connection.

Archiving the log entries

Archives all the log entries that are older than the specified cutoff time (in days).

Usage: Qlik.Logging.Service.exe archive [<options>]

Options

--cutoff or -c (Required)

--hours (Optional)

Cutoff time in days. Specify --hours option to interpret cutoff time as hours, for example, archive --cutoff X --hours. Specify zero (0) to archive all the entries.

Purging log entries

Purges all the archived log entries that are older than the specified cutoff time (in days).

Warning notePurge is an irreversible operation. Log entries are removed from the database and cannot be restored. This operation does not affect log messages in the log files.

Usage: Qlik.Logging.Service.exe purge [<options>]

Options

--cutoff or -c (Required)

--hours (Optional)

Cutoff time in days. Specify --hours option to interpret cutoff time as hours, for example, purge --cutoff X --hours. Specify zero (0) to purge all the entries.

Version

Usage: Qlik.Logging.Service.exe version [<options>]

Options

None. Displays Qlik Logging Service and logging database versions.

Help

Usage: Qlik.Logging.Service.exe help [<options>]

Options

None. Displays usage.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!