Aller au contenu principal

Logging

Certeasy uses structured logging with configurable level, format, output, and per-service overrides.

Configuration

logs:
level: info
format: json
output: file
file: "/var/log/certeasy/certeasy.log"
rotate:
max-size-mb: 100
max-backups: 10
services:
DB-Driver: warn
Certeasy-acme-server: debug
tags:
instance: cert-srv-01
region: eu-west

Fields

FieldDefaultDescription
levelinfoGlobal log level: debug, info, warn, error, off. off (alias none) fully suppresses logs and is most useful as a per-service override.
formatjsonLog format: json or text
outputstderrOutput destination: stderr, stdout, or file
fileLog file path. Required if output: file.
rotate.max-size-mbMax log file size in MB before rotation
rotate.max-backupsNumber of rotated log files to keep
servicesemptyPer-service log level overrides
tagsemptyUser-defined labels added to every log entry — useful for Grafana/Loki filtering

Per-Service Log Levels

You can set a different log level for each internal service. This is useful for debugging a specific component without flooding logs with debug output from everything else.

logs:
level: info
services:
Certeasy-acme-server: debug
Async-Acme-Challenges: debug

Use off (or none) to fully silence a service — for example when a chatty driver is generating noise during dev or staging captures:

logs:
services:
DB-Driver: off
Certeasy-acme-server: warn

Registered Service Names

Service NameDescription
DB-DriverDatabase driver and query logs
adcsADCS authority operations
Certeasy-acme-serverACME HTTP request handling
Async-Acme-Pki-HandlerAsync PKI job processing
Async-Acme-ChallengesAsync challenge validation
JWKSJWS key validation
workerJob engine (lease, dispatch, backoff)
http-serverHTTP server lifecycle

Tags (Grafana/Loki labels)

logs.tags is a free-form map of key: value pairs added to every log entry. Use it to attach environment metadata that your log aggregator (Grafana/Loki, Splunk, Elastic…) can filter on.

logs:
tags:
instance: cert-srv-01
region: eu-west
role: production

Each entry shows up as a top-level field in the JSON output, alongside time, level, msg, etc. There is no fixed list of allowed keys — pick whatever your stack expects.

remarque

The previous automatic env field is no longer added to log entries; it conflicted with the env= shown inside license-related log messages (license environment, e.g. env=dev / env=prod). If you want an environment label, set it explicitly under tags.

Log Rotation

Log rotation is supported when output: file. Configure rotate to limit disk usage:

logs:
output: file
file: "C:\\ProgramData\\certeasy\\certeasy.log"
rotate:
max-size-mb: 100
max-backups: 5

This keeps up to 5 rotated files of 100 MB each (500 MB total).

Production Recommendations

  • Use format: json for structured log ingestion (Splunk, Elastic, Loki…)
  • Use output: file with rotation to avoid filling disk
  • Keep global level at info and only set debug on specific services when troubleshooting
  • Route logs to your SIEM — the audit log entries contain account IDs, order IDs, and operation details