Skip to main content

log-right > ConfigurationManager

ConfigurationManager class​

A static class used to manage the log-right configuration data

Signature:
export declare class ConfigurationManager 

Properties​

PropertyModifiersTypeDescription
getConfigstatic() => Result<LogRightConfig>Get the current log configuration object
getConfigItemstatic<T>(name: string) => Result<T>Get an item from the current log configuration object
getLogEventConfigstatic(type: string) => LogEventConfigGet the current configuration for a specified log event type
getLogEventRegistrystatic() => Result<TypedIndexable<LogEventConfig>>Get all of the current configurations for the defined for log event types
setConfigstatic(params?: Partial<LogRightConfig<LogEventConfig<import("./types").ResultConfig<import("@log-right/base").CallbackFunction<unknown, import("@log-right/base").IResult<unknown, any, any>, unknown, import("@log-right/base").IResult<unknown, any, any>>>, import("./types").ReportConfig<import("./types").FormatFunction<unknown, Result<unknown>, import("@log-right/base").FormattedData, import("@log-right/base").Report<import("@log-right/base").FormattedData>, Result<import("@log-right/base").Report<import("@log-right/base").FormattedData>>>, import("./types").CaptureFunction<import("@log-right/base").FormattedData, import("@log-right/base").Report<import("@log-right/base").FormattedData>, unknown, Result<unknown>>, import("./types").ReportFunction<unknown, Result<unknown>, unknown, Result<unknown>>>>, import("@log-right/base").UserConfig>> | undefined) => ResultSet the configuration for how logging should be handled
setConfigItemstatic<T = unknown>(name: string, value: T) => ResultSet a specific item value on the configuration object
tryGetLogEventConfigstatic(type: string) => Result<LogEventConfig>Get the current configuration for a specified log event type

Methods​

MethodModifiersDescription
init(defaultConfig)staticA function used to initialize the configuration in memory