Refactor CommandLine and LoggerFactory for improved type handling
* Updated `CommandLine` class to replace `ConfigurationObject` with `CommandLineOptions` for better type consistency. * Refactored command line option setup into a separate method for clarity. * Modified `LoggerFactory` to directly use `LoggingLevel` type in `setLoggingLevel` method, enhancing logging level management.
This commit is contained in:
@@ -21,10 +21,9 @@ export default class LoggerFactory {
|
||||
return logger;
|
||||
}
|
||||
|
||||
public static setLoggingLevel(level: LoggingLevelType): void {
|
||||
const loggingLevel = LoggingLevelMapping.convertLoggingLevelTypeToLoggingLevel(level);
|
||||
console.log(`${new Date().toISOString()} [LoggerFactory] Setting logging level to [${level}]`);
|
||||
LoggerFactory._threshold.level = loggingLevel;
|
||||
public static setLoggingLevel(level: LoggingLevel): void {
|
||||
console.log(`${new Date().toISOString()} [LoggerFactory] Setting logging level to [${LoggingLevelMapping.convertLoggingLevelToLoggingLevelType(level)}]`);
|
||||
LoggerFactory._threshold.level = level;
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
|
||||
Reference in New Issue
Block a user