/** generic log appender configuration */
import { LogLevel, LogEvent } from '../log/log.model';
import { UrlAppender } from '../log/url.appender';
import { Type } from '@angular/core';
import { LogAppender } from '../log/log.appender';
import { ConsoleAppender } from '../log/console.appender';
import { LogPosition } from '../log';
export interface LogAppenderConfig {
    /** appender log level. It overrides the main log level */
    logLevel?: LogLevel;
}
/** console appender configuration */
export interface ConsoleAppenderConfig extends LogAppenderConfig {
    /** customizable prefix to be added to the log messages */
    prefixFormat?: string;
    /** pluggable custom prefix converters */
    prefixConverters?: ConsoleAppenderPrefixConverters;
}
/** The type of pluggable console prefix converters */
export type ConsoleAppenderPrefixConverters = {
    [key: string]: (event: LogEvent) => string;
};
/** log configuration */
export interface LogConfig {
    /** the name of the default logger, if LogService is used directly. Default: root */
    baseLoggerName?: string;
    /** log level. Default: LogLevel.ERROR */
    logLevel?: LogLevel;
    /** a list of log appenders' types. Default: ConsoleAppender with prefixFormat: '[{level}]' */
    logAppenders?: LogAppenderType | LogAppenderType[];
}
/** log appender type, containing also the configuration of the specified appender */
export type LogAppenderType = Type<LogAppender> | LogAppenderTypeConfig | ConsoleAppenderTypeConfig | UrlAppenderTypeConfig;
/** log appender configuration including also the type of the appender */
export interface LogAppenderTypeConfig extends LogAppenderConfig {
    /** the log appender type */
    type: Type<LogAppender>;
    /** additional configuration specific to the log appender */
    [key: string]: any;
}
/** console appender configuration including also the type of the console appender */
export interface ConsoleAppenderTypeConfig extends ConsoleAppenderConfig {
    /** the console appender type */
    type: Type<ConsoleAppender>;
}
/** url appender configuration including also the type of the url appender */
export interface UrlAppenderTypeConfig extends UrlAppenderConfig {
    /** the url appender type */
    type: Type<UrlAppender>;
}
/** url appender configuration */
export interface UrlAppenderConfig extends LogAppenderConfig {
    /** url to POST the log event to a server */
    url: string;
    /** extended log event triggered after the mentioned level. If missing, the extended log level is not triggered */
    detailedEventFromLevel?: LogLevel;
}
/** url log event */
export interface UrlLogEvent extends LogEvent {
    /** the code position from where the log has been triggered */
    position?: LogPosition;
    /** the url of the current page */
    location?: string;
}
//# sourceMappingURL=log.config.d.ts.map