refactor league module (wip)

This commit is contained in:
2025-12-22 12:57:10 +01:00
parent 9da528d5bd
commit 03dc81b0ba
39 changed files with 546 additions and 405 deletions

View File

@@ -1,9 +1,15 @@
import type { LogLevel } from '@core/automation/application/ports/LoggerLogLevel';
enum LogLevel {
DEBUG = 'debug',
INFO = 'info',
WARN = 'warn',
ERROR = 'error',
FATAL = 'fatal'
} // TODO move to core
export type LogEnvironment = 'development' | 'production' | 'test';
export interface LoggingEnvironmentConfig {
level: LogLevel;
level: LogLevel; // TODO
prettyPrint: boolean;
fileOutput: boolean;
filePath?: string;
@@ -46,19 +52,19 @@ function getDefaultsForEnvironment(env: LogEnvironment): LoggingEnvironmentConfi
switch (env) {
case 'development':
return {
level: 'debug',
level: LogLevel.DEBUG,
prettyPrint: true,
fileOutput: false,
};
case 'production':
return {
level: 'info',
level: LogLevel.ERROR,
prettyPrint: false,
fileOutput: true,
};
case 'test':
return {
level: 'warn',
level: LogLevel.WARN,
prettyPrint: false,
fileOutput: false,
};