- "Use 'log' section to define the log maximum size instead",
- );
- const defaultLogConfiguration: LogConfiguration = {
- enabled: true,
- file: 'logs/combined.log',
- errorFile: 'logs/error.log',
- statisticsInterval: Constants.DEFAULT_LOG_STATISTICS_INTERVAL,
- level: 'info',
- format: 'simple',
- rotate: true,
- };
- const deprecatedLogConfiguration: LogConfiguration = {
- ...(hasOwnProp(Configuration.getConfig(), 'logEnabled') && {
- enabled: Configuration.getConfig()?.logEnabled,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logFile') && {
- file: Configuration.getConfig()?.logFile,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logErrorFile') && {
- errorFile: Configuration.getConfig()?.logErrorFile,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logStatisticsInterval') && {
- statisticsInterval: Configuration.getConfig()?.logStatisticsInterval,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logLevel') && {
- level: Configuration.getConfig()?.logLevel,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logConsole') && {
- console: Configuration.getConfig()?.logConsole,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logFormat') && {
- format: Configuration.getConfig()?.logFormat,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logRotate') && {
- rotate: Configuration.getConfig()?.logRotate,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logMaxFiles') && {
- maxFiles: Configuration.getConfig()?.logMaxFiles,
- }),
- ...(hasOwnProp(Configuration.getConfig(), 'logMaxSize') && {
- maxSize: Configuration.getConfig()?.logMaxSize,
- }),
- };
- const logConfiguration: LogConfiguration = {
- ...defaultLogConfiguration,
- ...deprecatedLogConfiguration,
- ...(hasOwnProp(Configuration.getConfig(), 'log') && Configuration.getConfig()?.log),
- };
- return logConfiguration;
- }
-
- public static getWorker(): WorkerConfiguration {