mirror of
https://github.com/immich-app/immich.git
synced 2026-03-07 10:37:22 +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:
@@ -1,6 +1,6 @@
|
||||
import { Transform, Type } from 'class-transformer';
|
||||
import { IsEnum, IsInt, IsString, Matches } from 'class-validator';
|
||||
import { DatabaseSslMode, ImmichEnvironment, LogLevel } from 'src/enum';
|
||||
import { DatabaseSslMode, ImmichEnvironment, LogFormat, LogLevel } from 'src/enum';
|
||||
import { IsIPRange, Optional, ValidateBoolean } from 'src/validation';
|
||||
|
||||
export class EnvDto {
|
||||
@@ -48,6 +48,10 @@ export class EnvDto {
|
||||
@Optional()
|
||||
IMMICH_LOG_LEVEL?: LogLevel;
|
||||
|
||||
@IsEnum(LogFormat)
|
||||
@Optional()
|
||||
IMMICH_LOG_FORMAT?: LogFormat;
|
||||
|
||||
@Optional()
|
||||
@Matches(/^\//, { message: 'IMMICH_MEDIA_LOCATION must be an absolute path' })
|
||||
IMMICH_MEDIA_LOCATION?: string;
|
||||
|
||||
Reference in New Issue
Block a user