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:
2025-08-18 18:26:04 -04:00
parent 3875b3878d
commit eced0a6a2c
2 changed files with 31 additions and 48 deletions

View File

@@ -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() {