Refactor logging level handling and remove example usage
* 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.
This commit is contained in:
@@ -5,7 +5,7 @@ import {LoggingLevel, LoggingLevelMapping} from '../logger/LoggingLevel';
|
||||
export interface CommandLineOptions {
|
||||
applicationId: string;
|
||||
secret: string;
|
||||
logLevel: string;
|
||||
logLevel: LoggingLevel;
|
||||
pcastUri: string;
|
||||
ingestUri: string;
|
||||
channelUri: string;
|
||||
@@ -27,7 +27,7 @@ interface ConfigurationObject {
|
||||
useBrowserstackLocal: boolean;
|
||||
browserstackUser: string;
|
||||
browserstackKey: string;
|
||||
logLevel: string;
|
||||
logLevel: LoggingLevel;
|
||||
applicationId: string;
|
||||
secret: string;
|
||||
pcastUri: string;
|
||||
@@ -101,7 +101,7 @@ export default class CommandLine {
|
||||
|
||||
// Logging options
|
||||
if (config.logLevel) {
|
||||
args.push('--log-level', config.logLevel);
|
||||
args.push('--log-level', LoggingLevelMapping.convertLoggingLevelToLoggingLevelType(config.logLevel));
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
Reference in New Issue
Block a user