mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat(server): implement switchable logging formats (console/json) (#24791)
* feat(server): add LogFormat enum and configuration
* feat(server): add structured logging formatters
* feat(server): implement switchable logging formats (console/json)
* Revert "feat(server): add LogFormat enum and configuration"
This reverts commit 565e95ae68.
* feat(server): implement JSON logging using NestJS native support
* refactor: rename LOG_FORMAT to IMMICH_LOG_FORMAT for consistency
* docs: add IMMICH_LOG_FORMAT documentation
* chore: format environment-variables.md
* chore: format monitoring.md
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
ImmichHeader,
|
||||
ImmichTelemetry,
|
||||
ImmichWorker,
|
||||
LogFormat,
|
||||
LogLevel,
|
||||
QueueName,
|
||||
} from 'src/enum';
|
||||
@@ -29,6 +30,7 @@ export interface EnvData {
|
||||
environment: ImmichEnvironment;
|
||||
configFile?: string;
|
||||
logLevel?: LogLevel;
|
||||
logFormat?: LogFormat;
|
||||
|
||||
buildMetadata: {
|
||||
build?: string;
|
||||
@@ -233,6 +235,7 @@ const getEnv = (): EnvData => {
|
||||
environment,
|
||||
configFile: dto.IMMICH_CONFIG_FILE,
|
||||
logLevel: dto.IMMICH_LOG_LEVEL,
|
||||
logFormat: dto.IMMICH_LOG_FORMAT || LogFormat.Console,
|
||||
|
||||
buildMetadata: {
|
||||
build: dto.IMMICH_BUILD,
|
||||
|
||||
Reference in New Issue
Block a user