{"record":{"id":"81ea1a057e177196","repo":"immich-app/immich","slug":"deprecated-message","errorCode":null,"errorMessage":"[Deprecated] ${message}","messagePattern":"\\[Deprecated\\] (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/src/repositories/logging.repository.ts","lineNumber":159,"sourceCode":"\n  log(message: string, ...details: LogDetails) {\n    this.handleMessage(LogLevel.Log, message, details);\n  }\n\n  warn(message: string, ...details: LogDetails) {\n    this.handleMessage(LogLevel.Warn, message, details);\n  }\n\n  error(message: string | Error, ...details: LogDetails) {\n    this.handleMessage(LogLevel.Error, message, details);\n  }\n\n  fatal(message: string, ...details: LogDetails) {\n    this.handleMessage(LogLevel.Fatal, message, details);\n  }\n\n  deprecate(message: string) {\n    this.warn(`[Deprecated] ${message}`);\n  }\n\n  private handleFunction(level: LogLevel, message: LogFunction, details: LogDetails[]) {\n    if (this.logger.isLevelEnabled(level)) {\n      this.handleMessage(level, message(), details);\n    }\n  }\n\n  private handleMessage(level: LogLevel, message: string | Error, details: LogDetails[]) {\n    switch (level) {\n      case LogLevel.Verbose: {\n        this.logger.verbose(message, ...details);\n        break;\n      }\n\n      case LogLevel.Debug: {\n        this.logger.debug(message, ...details);\n        break;","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/repositories/logging.repository.ts#L141-L177","documentation":"deprecate is a logger helper that emits a warning prefixed with '[Deprecated]' for APIs or settings that will be removed. It does not throw; it informs developers at runtime that they are using something scheduled for removal.","triggerScenarios":"Any code path calling logger.deprecate(message) — e.g. detecting an obsolete config key, env var, or API parameter that still works but is superseded.","commonSituations":"Upgrading Immich to a version where a config option was renamed; passing deprecated CLI/env settings; calling a deprecated repository method from custom code.","solutions":["Read the message body after '[Deprecated]' to identify what is deprecated","Replace the deprecated config key/env var/API with its documented replacement","Consult the Immich release notes/migration guide for the version you upgraded to","Silence is not recommended — the item will eventually be removed and start hard-failing"],"exampleFix":"// before (config)\nIMMICH_WEB_ROOT: /app/www\n// after (use the renamed key per the deprecation message)\nIMMICH_WEB_ROOT_DIR: /app/www  # example: renamed key from release notes","handlingStrategy":"validation","validationCode":"const deprecatedKeys: Record<string, string> = {\n  OLD_CONFIG_KEY: 'NEW_CONFIG_KEY',\n};\nfor (const [oldKey, newKey] of Object.entries(deprecatedKeys)) {\n  if (oldKey in config) throw new Error(`Replace ${oldKey} with ${newKey} before upgrading`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read release notes on every upgrade for renamed config/env keys","Grep deployments for keys mentioned in '[Deprecated]' warnings","Fix deprecations promptly — they become removals in future versions","Keep a migration checklist for config renames in infrastructure-as-code"],"tags":["deprecation","logging","config"],"backgroundTag":"deprecated-api-usage","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}