Nodejs log4js uses PM2 to start not logging

the log is normal in local mode. After starting with pm2 cluster mode, the log cannot be output. The method of searching on the Internet has been tried all over, but it still doesn"t work.

version:
nodejs:9.0.0
express:4.11
log4js:2.5.3

log configuration file:


log4js.configure(
  {
    pm2: true,
    pm2InstanceVar: "INSTANCE_ID",  
    //pm2InstanceVar: 0, 
    replaceConsole: true,
    appenders: {
        stdout: {
            type: "stdout"
        },
        req: {
            type: "dateFile",
            filename: "logs/",
            pattern: "yyyy-MM-dd.log",
            alwaysIncludePattern: true
        }
    },
    categories: {
        default: { appenders: ["stdout", "req"], level: "debug" }
    }
}


);
 
var logger = log4js.getLogger("H5API");
Mar.28,2021

are you sure it's not related to the output level


finally solved the problem?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f99c-4bf53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f99c-4bf53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?