* Updated `CommandLineOptions` and `ConfigurationObject` to use `LoggingLevel` type instead of string for log levels. * Modified `LoggerFactory` to set logging levels using the new `LoggingLevelMapping` methods. * Removed the `example-usage.ts` file as it was no longer needed. * Adjusted `Threshold` class to simplify logging level management.
19 lines
661 B
TypeScript
19 lines
661 B
TypeScript
import LoggerFactory from '../logger/LoggerFactory';
|
|
import CommandLine from '../config/CommandLine';
|
|
import { CommandLineOptions } from '../config/CommandLine';
|
|
|
|
export default class TestRunner {
|
|
private static readonly _logger = LoggerFactory.getLogger('TestRunner');
|
|
private static readonly _commandLineOptions: CommandLineOptions = CommandLine.parse(process.argv);
|
|
|
|
static {
|
|
TestRunner.run();
|
|
}
|
|
|
|
public static run(): void {
|
|
LoggerFactory.setLoggingLevel(TestRunner._commandLineOptions.logLevel);
|
|
|
|
TestRunner._logger.info('TestRunner started');
|
|
TestRunner._logger.info(JSON.stringify(TestRunner._commandLineOptions, null, 2));
|
|
}
|
|
} |