In production server we are facing a issues like console.log file inside logs folder is not purging automatically. It is growing more than a GB. so server space utilization is reaching 100%.
- How to set maximum file size for console.log?
- How to archive the console.log file?
- Do we have any necessity to write the
loggingtag in server.xml before or after some particular tag? because in my old project i placed 'logging' tag at last and it works fine.
Server.xml file lines related to logging
<logging maxFileSize="10" maxFiles="6" messageFileName="messages.log" logDirectory="/opt/IBM/WebSphere/Liberty/usr/servers/LibertyServer/logs" />
<logging consoleLogLevel="AUDIT"/>
initOptions.js
var wlInitOptions = {
connectOnStartup : true,
timeout : 60000,
logger : {
enabled: true,
level: 'debug',
stringify: true,
pretty: false,
tag: {
level: false,
pkg: true
},
whitelist: [],
blacklist: [],
nativeOptions: {
capture: true
}
},
analytics : {
enabled: false
}
};
Currently i can see all the logs in console.log file. I knew it is because of log level is set as AUDIT. To make a note we were using logger.send from device often to send the logs to server.
Worklight version 6.0.0.2 Liberty profile version 8.5.5.0-20130510-0831
if you need any info please comment.