UNPKG

@athenna/logger

Version:

The Athenna logging solution. Log in stdout, files and buckets.

53 lines (52 loc) 1.27 kB
/** * @athenna/logger * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ export declare abstract class Driver { /** * Holds the configuration object itself. */ configs: any; /** * Holds the configuration object of a driver. */ driverConfig: any; /** * Holds the formatter string value. */ formatter: string; /** * Holds the configuration object of formatter. */ formatterConfig: any; /** * The max log level that this driver can transport. */ level: string; /** * The log level order to check if log could * be transported or not. */ levelOrder: string[]; constructor(configs?: any); /** * Transport the log. */ abstract transport(level: string, message: any): any; /** * Check if message could be transported. */ couldBeTransported(level: string): boolean; /** * Call formatter factory to format the message. */ format(level: string, message: any, clean?: boolean): string; /** * Get the stream type for level. */ getStreamTypeFor(level: string): string; }