import log4js from 'log4js' ; export default ( app ) : void => { log4js . configure ( { appenders : { _trace : { type : 'file' , filename : 'logs/trace' , pattern : "yyyy-MM-dd.log" , alwaysIncludePattern : true , maxLogSize : 31457280 } , trace : { type : "logLevelFilter" , appender : "_trace" , level : "trace" , maxLevel : "debug" } , _info : { type : 'file' , filename : 'logs/info' , pattern : "yyyy-MM-dd.log" , alwaysIncludePattern : true , maxLogSize : 31457280 } , info : { type : "logLevelFilter" , appender : "_info" , level : "info" , maxLevel : "info" } , _error : { type : 'file' , filename : 'logs/error' , pattern : "yyyy-MM-dd.log" , alwaysIncludePattern : true , maxLogSize : 31457280 } , error : { type : "logLevelFilter" , appender : "_error" , level : "warn" , maxLevel : "fatal" } } , categories : { default : { appenders : [ 'trace' , 'info' , 'error' ] , level : 'all' } } } ) ; app . use ( log4js . connectLogger ( log4js . getLogger ( "http" ) , { level : 'auto' } ) ) ; } ;