mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:26:55 +00:00
fix(logger): fix the issue where workflow log files do not output (#4657)
This commit is contained in:
parent
c2687f71e3
commit
d8e80ecb41
@ -26,7 +26,6 @@ export class PluginActionCustomRequestServer extends Plugin {
|
|||||||
const logger = this.createLogger({
|
const logger = this.createLogger({
|
||||||
dirname: 'custom-request',
|
dirname: 'custom-request',
|
||||||
filename: '%DATE%.log',
|
filename: '%DATE%.log',
|
||||||
transports: [...(process.env.NODE_ENV === 'production' ? ['dailyRotateFile'] : ['console'])],
|
|
||||||
} as LoggerOptions);
|
} as LoggerOptions);
|
||||||
|
|
||||||
return logger;
|
return logger;
|
||||||
|
@ -121,9 +121,8 @@ export default class PluginWorkflowServer extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const logger = this.createLogger({
|
const logger = this.createLogger({
|
||||||
dirname: path.join('workflows', date),
|
dirname: path.join('workflows', String(workflowId)),
|
||||||
filename: `${workflowId}.log`,
|
filename: '%DATE%.log',
|
||||||
transports: [...(process.env.NODE_ENV !== 'production' ? ['console'] : ['file'])],
|
|
||||||
} as LoggerOptions);
|
} as LoggerOptions);
|
||||||
|
|
||||||
this.loggerCache.set(key, logger);
|
this.loggerCache.set(key, logger);
|
||||||
|
Loading…
Reference in New Issue
Block a user