refactor league module (wip)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user