Skip to content

Logging

This page covers the logs of the Katalogue backend services: the API and, when it runs on its own, the worker. For the logs of the repository database, see the official PostgreSQL documentation.

Katalogue logs the following:

  • Errors, with the reasons behind them. See Finding an Error.
  • Authentication: every login, logout, session renewal, password change and password reset request, successful or not, with the account it was for. REST API clients requesting an access token are logged the same way. See Authentication Events.
  • Privileged operations: every change to users, their roles, provisioning user groups and their members, REST API clients and settings, with who made it, and every start, stop and restart of the backend services. See Privileged Operations.
  • Data access, optionally: who read or changed what, request by request, when data access logging is enabled.

Two database tables complement the log:

  • public.changelog records every data change with its values before and after, the user who made it and the request that made it. See Finding Everything One Request Did.
  • public.http_request records every request with its response time, when HTTP request logging is enabled.

Log files are rotated automatically. The two tables are not: they must be cleaned up manually.

Katalogue writes its log to two outputs, both enabled by default:

OutputWhat it is for
FileA file per service and day on the server or a mounted volume, rotated automatically. See Log Files.
Console (stdout)The process’s standard output, which Docker, Kubernetes and other platforms collect from a container.

Either can be turned off, but not both: Katalogue does not start without a log. See Outputs, Format and Time Zone.

Log files are written to the logs folder inside the backend service directory — services/api/logs in a source installation, /usr/app/logs in the Docker container — whatever directory the service was started from. One file is written per day, named after the service and the date:

FileWritten by
katalogue_api_<date>.logThe backend API service, including the scheduler and worker when they run embedded
katalogue_worker_<date>.logA separate worker service, when one is deployed

The two services write separate files because they may share a log folder, and two processes writing one file would interleave their entries and interfere with each other’s rotation.

Each service keeps an audit file next to its logs, katalogue_api_audit.json or katalogue_worker_audit.json, recording the files it has written. Files older than LOG_MAXFILES (14 days by default) are deleted as the log rotates.

Katalogue supports two log formats, JSON and text. Log files are always JSON, while the console’s format is configurable: by default JSON when NODE_ENV is production, as in the Docker images, and text otherwise. LOG_FORMAT sets it explicitly; see Outputs, Format and Time Zone.

  • JSON is JSON Lines: one JSON object per entry and line, with field names from the Elastic Common Schema (ECS). The example below is spread over several lines to be readable; in the log, the same entry is a single line.
  • Text is for a person reading the console: a line with the time, level and message, followed by the same fields as the JSON, except service and host, which are the same on every line.

Forwarding the JSON entries to a SIEM system, as they are or converted to another format, is the job of a log collector; see its documentation.

{
"@timestamp": "2026-11-09T13:12:03.000Z",
"log.level": "info",
"message": "The request contains invalid data",
"ecs.version": "9.5.0",
"service": {
"name": "katalogue_api",
"version": "0.25.0"
},
"host": {
"name": "katalogue-api-1"
},
"user": {
"name": "jane.doe"
},
"client": {
"ip": "10.0.0.5"
},
"http": {
"request": {
"id": "0d5b1f0e-3c4a-4f39-9c55-2f1c7e0b8a61",
"method": "PUT"
},
"response": {
"status_code": 400
}
},
"url": {
"original": "/api/system",
"domain": "katalogue.example.com"
},
"event": {
"kind": "event",
"action": "input_validation_fail",
"category": [
"api"
],
"type": [
"info"
],
"outcome": "failure"
},
"error": {
"code": "validation_failed"
},
"katalogue": {
"fields": [
"systems[0].system_name: invalid — A System with provided name already exists"
]
}
}
FieldWhat it holds
@timestampWhen the entry was written, in RFC 3339 (ISO 8601) format with milliseconds, in the time zone set by LOG_TIMEZONE (UTC by default).
log.levelThe log level.
messageWhat happened. For an error, the message the user or client was given.
service.*, host.nameWhich service wrote the entry (katalogue_api or katalogue_worker), its version, ENVIRONMENT when set, and the server or container it ran on.
user.name, user.id, user.rolesWho made the request, when known, and their role.
user.target.*, user.changes.roles, group.*For a change to an account: the account changed, its role before (user.target.roles) and after (user.changes.roles), and the user group.
client.ip, http.*, url.*The request: where it came from, its request id, method and path, and the status it was answered with.
event.*What kind of event the entry records. See Event Fields.
error.*For an error, its code, the reasons behind it (error.message) or, for a failure of Katalogue itself, the full chain of errors with stack traces (error.stack_trace).
katalogue.*Anything else Katalogue adds, such as the fields a request was refused for.

The log level decides which entries are written. Each level includes every level above it in the table.

LevelWhat is logged
criticalOnly failures that stop the backend service, such as a failure to start.
errorAlso failures of Katalogue itself, such as an unreachable database, with the full error.
warningAlso security events: refused logins, invalid tokens, missing permissions and rate limits.
info (default)Also routine events, such as logins, changes to accounts and settings, the services starting and stopping, requests that failed validation and failed connection tests.
debugEverything, including the output of the libraries the Snowflake and Databricks connectors use, marked [snowflake-sdk], [databricks-sql] and [thrift]. At the other levels only these libraries’ warnings and errors are logged, and nothing from thrift.

Successful logins and changes to accounts and settings are logged at info, so keep the level at info or debug where these must be logged.

This section describes some of the most important configuration options, see the logging category in the Config Parameter Reference for a complete reference.

The GUI offers two logging settings under Settings -> Logging: the log level and HTTP request logging. Everything else is set in the logging section of appsettings.json or as environment variables.

The GUI offers only Info and Debug, so the level can be raised while investigating a problem and lowered again. The other levels are deployment configuration: set LOG_LEVEL as an environment variable or in appsettings.json. A level set that way takes precedence over the GUI, where the setting is then shown as disabled.

  • LOG_TO_FILE_IS_ENABLED and LOG_TO_STDOUT_IS_ENABLED turn the files and the console on or off, for example the files when the container platform already collects the console.
  • LOG_FORMAT sets the console to json or text and ignores whatever NODE_ENV is.
  • LOG_TIMEZONE sets the time zone of the timestamps. When it is UTC, a new log file starts at UTC midnight. In any other time zone it starts at the server’s local midnight, which is only the same when the server runs in that time zone.

Set LOG_DATA_ACCESS to log who read or changed what:

ValueWhat is logged
none (default)Nothing.
changesRequests that create, change or delete something.
allAlso every request that reads something.

Every request is logged, not every page, and a page in the GUI makes several requests, so all gives a much larger log than changes. Use changes unless reads must be logged.

LOG_DATA_ACCESS can only be set in the configuration file or as an environment variable, so that the users whose access it records cannot switch it off from the GUI. Every entry names a person; see PII/GDPR for what that means for how long logs are kept. See Data Access Events for what an entry holds.

Enable HTTP Request logging under Settings -> Logging or by setting HTTP_LOGGING_IS_ENABLED, it is disabled by default. When enabled, Katalogue records every request to the backend service in the public.http_request table: the endpoint, the requester (IP address, and username when known), the status and the response time.

This feature is primarily meant for temporary debugging and performance profiling, and costs two extra database operations per request. Use the Data Access Log feature for security auditing.

Every error is logged with a request id. When something unexpected goes wrong, the GUI shows that id as Error ID, and REST API clients receive it as requestId with every error. Search the log for it in http.request.id to find the entry with more details on the error.

A refused or invalid request is logged with the reasons behind it, which the user is not always told, such as why a login was refused. A failure of Katalogue itself is logged with the full chain of errors behind it, stack traces included. Submitted values are never logged (except for settings changes made by admins), since they may hold sensitive data like passwords.

The entry in the example under Log Format is such a refusal: its katalogue.fields say which value was refused and why.

Events carry the event fields, so they can be filtered on without knowing every message:

To findFilter on
Every security event: logins and logouts, password changes, changes to accounts, roles and settings, the services starting and stopping, invalid or expired tokens, missing permissions, failed CSRF checks and rate limitsevent.category is authentication, session, iam, configuration or process, or event.type is denied
Refused logins onlyevent.category is authentication and event.outcome is failure
Requests that are malformed, too large, failed validation, refer to something that does not exist or conflict with the current dataevent.category is api and event.type is info
Failures of Katalogue itself, such as an unreachable databaseevent.type is error
Connection tests, test emails, Microsoft Entra Id configuration tests and filter validations that did not pass, with what the tested system saidevent.action starts with diagnostic_

Every request to the API has an id: http.request.id in the log, shown as Error ID in the GUI, and given to REST API clients as requestId and in the X-Request-Id header. Changes and jobs record it too:

-- What the request changed, with the values before and after
SELECT * FROM public.changelog WHERE request_id = '<request id>' ORDER BY changelog_id;
-- The jobs it queued
SELECT * FROM public.job WHERE request_id = '<request id>';

A job’s own changes are found through its job: SELECT c.* FROM public.changelog c JOIN public.job j USING (transaction_id) WHERE j.job_id = <job id>. A change made directly in the database has no request id.

FieldWhat it holds
event.actionThe event, named after the OWASP Logging Vocabulary where one fits, such as authn_login_fail or authz_fail.
event.categoryECS’s category, such as authentication, session or api.
event.typeECS’s type, such as denied for a request refused for missing permissions or rate limits, or error for a failure of Katalogue itself.
event.outcomesuccess, failure or unknown.
event.actionWhenLevel
authn_login_successA user logged in, with a password or Microsoft Entra ID, or a REST API client was issued an access token.info
authn_login_failA login, session renewal or access token request was refused. user.name holds the username or client id that was tried, and error.message (katalogue.oauth_error and katalogue.reason for a REST API client) says why.warning
session_logoutA user logged out.info
session_renewedA user’s session was renewed with its refresh token.info
authn_token_reuseA refresh token that was already replaced or revoked was presented again, which can mean it was stolen.warning
authn_password_changeA user changed its password, or set a new one with a password reset email.info
authn_password_change_failA password change was refused, because the current password or the reset token was wrong.warning
authn_password_reset_requestA password reset email was requested. event.outcome is failure when no user has the username given.info

Requests refused for a missing, invalid or expired token are logged as authn_token_missing, authn_token_invalid and session_use_after_expire.

A change is logged once it has been saved, one entry per account, user group or setting changed, with user.name saying who made it. A change made by an Microsoft Entra ID sync job has no user.name when the job was scheduled; katalogue.job_id says which job made it.

A changed setting is logged with its value before and after, except a secret, which is logged as changed only. A changed account is logged with the names of the attributes changed, not their values, since they are personal data; its roles are logged with their values. The full values of every change are in the public.changelog table, with secrets hidden.

Only user groups that provision users are covered, since they are what give users a role. Changes to other user groups, which group users as owners of assets, are recorded in the changelog only.

event.actionWhenLevel
user_createdA user was created, by hand or from Active Directory, or a REST API client was created. user.target.roles holds its role or scopes.info
user_updatedA user or REST API client was changed. katalogue.changed_attributes lists what changed. A user that could not be deleted because it owns assets, and was disabled instead, is logged this way too.info
user_deletedA user or REST API client was deleted.info
authz_changeA user’s role, or a REST API client’s scopes, changed: from user.target.roles to user.changes.roles. A role given by a provisioning user group is logged this way.info
user_group_created, user_group_updated, user_group_deletedA provisioning user group was created, changed or deleted, including turning provisioning on or off and changing its default role.info
user_group_member_added, user_group_member_removedA user was added to or removed from a provisioning user group.info
authn_token_createdA new secret was generated for a REST API client.info
authz_adminA setting was changed: katalogue.setting names it, and katalogue.old_value and katalogue.new_value hold its value before and after, unless it is a secret (katalogue.setting_is_secret). Also logged when the REST API signing key is rotated.info
sys_startup, sys_shutdownThe backend API or worker service started, or stopped when asked to (katalogue.signal).info
sys_restartThe service restarted to apply saved settings.info
sys_crashThe service stopped because of an error it could not handle, or could not start, with the error in error.stack_trace.critical

A REST API client is identified by its client id, the same user.name its logins have, with its name in katalogue.client_name.

With LOG_DATA_ACCESS enabled, each request to the API is logged as a data_access event, at level info:

FieldWhat it holds
event.typeThe kind of access: access (a read), creation, change or deletion.
event.outcomesuccess or failure by the answer’s status, or unknown with event.reason aborted when the client gave up before the answer.
user.nameThe user, or the REST API client’s id.
http.*, url.original, client.ip, user_agent.originalThe request, its answer, and where it came from.
katalogue.duration_msHow long the request took.

The kind of access follows the request’s method: GET reads, PUT changes and DELETE deletes. A POST is a creation, a read or a change depending on its path, and counts as a change when that is not clear, so changes never misses one.

Health checks and CORS preflight requests are not logged. A refused request is logged both as a data_access event and as the event saying why it was refused, such as authz_fail.

Security logging standards, typically based on NIST SP 800-92 or ISO 27001, ask for broadly the same things. This is where Katalogue covers each:

RequirementWhere it is covered
A standard format, with UTC timestampsLog Format: JSON Lines with Elastic Common Schema field names, RFC 3339 timestamps in UTC by default.
Warnings when logging failssys_log_write_fail on stderr, see Log Format.
Authentication: logins, logoffs, password changes, success and failureAuthentication Events.
Privileged operations: accounts, groups, roles, configuration, system start and stopPrivileged Operations.
Failed access to resourcesauthz_fail, authn_token_invalid and the other refused-request events, see Filtering Events.
Successful access to resourcesData Access Log and Data Access Events. See also PII/GDPR on what data Katalogue holds.
Access to log files, and disk capacityKatalogue does not serve its log files or watch the disk; both are monitored on the host.
Antivirus, EDR, IDS and firewall eventsOutside the application.