fix logger

This commit is contained in:
2025-12-15 22:39:17 +01:00
parent 7a11daa878
commit 3b566c973d
110 changed files with 1413 additions and 903 deletions

View File

@@ -1,8 +1,8 @@
import type { LoggerPort } from '../../../application/ports/LoggerPort';
import type { LogContext } from '../../../application/ports/LoggerContext';
import type { ILogger } from '@gridpilot/shared/logging/ILogger';
import type { Logger } from '@gridpilot/shared/logging/Logger';
export class NoOpLogAdapter implements LoggerPort, ILogger {
export class NoOpLogAdapter implements LoggerPort, Logger {
debug(_message: string, _context?: LogContext): void {}
info(_message: string, _context?: LogContext): void {}

View File

@@ -2,7 +2,7 @@ import type { LoggerPort } from '@gridpilot/automation/application/ports/LoggerP
import type { LogContext } from '@gridpilot/automation/application/ports/LoggerContext';
import type { LogLevel } from '@gridpilot/automation/application/ports/LoggerLogLevel';
import { loadLoggingConfig, type LoggingEnvironmentConfig } from '../../config/LoggingConfig';
import type { ILogger } from '@gridpilot/shared/logging/ILogger';
import type { Logger } from '@gridpilot/shared/logging/Logger';
const LOG_LEVEL_PRIORITY: Record<LogLevel, number> = {
debug: 10,
@@ -21,7 +21,7 @@ const LOG_LEVEL_PRIORITY: Record<LogLevel, number> = {
*
* This provides structured JSON logging to stdout with the same interface.
*/
export class PinoLogAdapter implements LoggerPort, ILogger {
export class PinoLogAdapter implements LoggerPort, Logger {
private readonly config: LoggingEnvironmentConfig;
private readonly baseContext: LogContext;
private readonly levelPriority: number;