import Stream from 'stream' ; import { EventEmitter } from 'events' ; declare class Logger extends EventEmitter { constructor ( options ) ; addStream ( stream ) ; addSerializers ( serializers ) ; child ( options , simple ? ) ; reopenFileStreams ( ) ; level ( ) ; level ( value ) ; levels ( ) ; levels ( name ) ; levels ( name , value ) ; /**
     * Terafoundation specific
     */ streams : Stream | WritableStream | undefined [ ] ; fields : any ; src : boolean ; /**
     * Returns a boolean: is the `trace` level enabled?
     *
     * This is equivalent to `log.isTraceEnabled()` or `log.isEnabledFor(TRACE)` in log4j.
     */ trace ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ trace ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ trace ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ trace ( format , ... params ) ; /**
     * Returns a boolean: is the `debug` level enabled?
     *
     * This is equivalent to `log.isDebugEnabled()` or `log.isEnabledFor(DEBUG)` in log4j.
     */ debug ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ debug ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ debug ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ debug ( format , ... params ) ; /**
     * Returns a boolean: is the `info` level enabled?
     *
     * This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j.
     */ info ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ info ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ info ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ info ( format , ... params ) ; /**
     * Returns a boolean: is the `warn` level enabled?
     *
     * This is equivalent to `log.isWarnEnabled()` or `log.isEnabledFor(WARN)` in log4j.
     */ warn ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ warn ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ warn ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ warn ( format , ... params ) ; /**
     * Returns a boolean: is the `error` level enabled?
     *
     * This is equivalent to `log.isErrorEnabled()` or `log.isEnabledFor(ERROR)` in log4j.
     */ error ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ error ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ error ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ error ( format , ... params ) ; /**
     * Returns a boolean: is the `fatal` level enabled?
     *
     * This is equivalent to `log.isFatalEnabled()` or `log.isEnabledFor(FATAL)` in log4j.
     */ fatal ( ) ; /**
     * Special case to log an `Error` instance to the record.
     * This adds an `err` field with exception details
     * (including the stack) and sets `msg` to the exception
     * message or you can specify the `msg`.
     */ fatal ( error , ... params ) ; /**
     * The first field can optionally be a "fields" object, which
     * is merged into the log record.
     *
     * To pass in an Error *and* other fields, use the `err`
     * field name for the Error instance.
     */ fatal ( obj , ... params ) ; /**
     * Uses `util.format` for msg formatting.
     */ fatal ( format , ... params ) ; /**
     * Terafoundation specific, flush the logs
     */ flush ( ) ; } declare namespace Logger { const TRACE ; const DEBUG ; const INFO ; const WARN ; const ERROR ; const FATAL ; type LogLevelString = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' ; type LogLevel = LogLevelString | number ; const levelFromName ; const nameFromLevel ; const stdSerializers ; function createLogger ( options ) ; function safeCycles ( ) ; function resolveLevel ( value ) ; interface Stream { type ? : string ; level ? : LogLevel ; path ? : string ; stream ? : NodeJS . WritableStream | Stream ; closeOnExit ? : boolean ; period ? : string ; count ? : number ; name ? : string ; reemitErrorEvents ? : boolean ; } interface LoggerOptions { name : string ; streams ? : Stream [ ] ; level ? : LogLevel ; stream ? : NodeJS . WritableStream ; serializers ? : Serializers ; src ? : boolean ; [ custom ] : any ; } type Serializer = ( input : any ) => any ; interface Serializers { [ key ] : Serializer ; } interface StdSerializers extends Serializers { err : Serializer ; res : Serializer ; req : Serializer ; } interface RingBufferOptions { limit ? : number ; } class RingBuffer extends EventEmitter implements NodeJS . WritableStream { constructor ( options ) ; writable : boolean ; records : any [ ] ; write ( record ) ; end ( record ? ) ; destroy ( ) ; destroySoon ( ) ; } interface RotatingFileStreamOptions { path : string ; count ? : number ; period ? : string ; } class RotatingFileStream extends EventEmitter implements NodeJS . WritableStream { constructor ( options ) ; writable : boolean ; periodNum : number ; periodScope : string ; stream : any ; rotQueue : any [ ] ; rotating : boolean ; write ( record ) ; end ( record ? ) ; destroy ( ) ; destroySoon ( ) ; rotate ( ) ; } } export { Logger } ;