@tangential/core
Version:
Core types and support code for Tangential
41 lines (40 loc) • 1.42 kB
TypeScript
import { LogMessage } from './log-message';
import * as i0 from "@angular/core";
export declare type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 'NONE';
/**
*
*
*/
export declare const LogLevels: {
NONE: LogLevel;
fatal: LogLevel;
error: LogLevel;
warn: LogLevel;
info: LogLevel;
debug: LogLevel;
trace: LogLevel;
};
export declare class LoggerConfiguration {
contextAsStringWidth: number;
includeFullContext: boolean;
/**
* For temporarily shutting of logging, use NONE, but if you are shutting off logging for production, or because you're using
* another logging system, you should Provide a simpler logging class in your module configuration.
* @type {LogLevel}
*/
logLevel: LogLevel;
}
export declare abstract class Logger {
config: LoggerConfiguration;
protected constructor(configuration?: LoggerConfiguration);
abstract log(message: LogMessage): void;
trace(context: any, ...message: any[]): void;
debug(context: any, ...message: any[]): void;
info(context: any, ...message: any[]): void;
warn(context: any, ...message: any[]): void;
error(context: any, ...message: any[]): void;
fatal(context: any, ...message: any[]): void;
private applyLevel;
static ɵfac: i0.ɵɵFactoryDeclaration<Logger, [{ optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<Logger>;
}