fix logger
This commit is contained in:
@@ -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 {}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user