Add logging framework with Logger, LoggerFactory, and appenders

- Introduced ILogger interface for logging methods
- Implemented Logger class with various logging levels and message formatting
- Created LoggerFactory for managing logger instances and appender configuration
- Added LoggingLevel enum and mapping for logging level types
- Developed ConsoleAppender and TechnikerMeAppender for different logging outputs
- Implemented appender management with AppenderFactory and base Appender class
- Established Threshold class for controlling logging levels
This commit is contained in:
2025-10-30 03:15:16 -04:00
parent cb34256276
commit 1587ed7428
12 changed files with 407 additions and 0 deletions

19
src/logger/Threshold.ts Normal file
View File

@@ -0,0 +1,19 @@
import Defaults from '../Defaults';
import { Subject } from '../lang/observables';
import { LoggingLevel } from './LoggingLevel';
export class Threshold {
private _threshold: Subject<LoggingLevel>;
constructor(loggingLevel?: LoggingLevel) {
this._threshold = new Subject(loggingLevel ?? Defaults.loggingLevel);
}
set value(value: LoggingLevel) {
this._threshold.value = value;
}
get value(): LoggingLevel {
return this._threshold.value;
}
}