Recorded information includes the time of the incident, the severity, the responsible IP and user or session, and the action, such as a failed authorization check. For security reasons, audit logs are not visible on the regular web user interface and can only be viewed in the application service logs or searched in a terminal using the CLI commands documented below.

Severity Levels

SeverityLog LevelDescription
alertpanicsecurity alert, e.g. an attack has been detected
criticalfatalcritical security incidents and application errors
errorerrorfailed authorization checks, application errors
warningwarningfile deletions, failed logins, and invalid api requests
infoinfoexpected and uncritical actions e.g. file uploads
debugdebuginformational messages, e.g. successful logouts

Config Options

The general verbosity level of log messages can be set with PHOTOPRISM_LOG_LEVEL. In addition, incidents with a level equal to or higher than PHOTOPRISM_AUDIT_LEVEL are recorded in the database in a structured way so that they can be searched.

Environment VariableCLI FlagDefaultDescription
PHOTOPRISM_LOG_LEVEL–log-levelinfolog message verbosity LEVEL (trace, debug, info, warning, error, fatal, panic)
PHOTOPRISM_AUDIT_LEVEL–audit-levelwarningaudit log recording LEVEL (debug, info, warning, error, fatal, panic)

Audit Commands

Use the following terminal commands to search the database for login attempts, user actions and incidents, or application errors:

CommandDescription
photoprism audit logins [search]Displays login attempts
photoprism audit logs [search]Displays audit logs
photoprism audit errors [search]Displays error logs

You can combine them with these flags to change the output format and the maximum number of search results:

Command FlagDescription
--md, -mformat as machine-readable Markdown
--csv, -cexport as semicolon separated values
--tsv, -texport as tab separated values
-n LIMITLIMIT number of results (default: 100)

Run photoprism audit clear to clear all recorded incidents and reset the database to a clean state.

PhotoPrism® Documentation

For more information on specific features, services and related resources, please refer to the other documentation available in our Knowledge Base and User Guide: