You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It create a file and write a log. everything is working.
The problem is log written in single line. but, i need to write every log in separate line.
My log file:
2018-10-30 04:48:43 INFO Start 2018-10-30 04:48:53 INFO Model Page : User id - TEST12345 2018-10-30 04:48:56 INFO Dashboard Page : setmodel 2018-10-30 05:26:50 INFO About Page : setmodel
Expected output:
2018-10-30 04:48:43 INFO Start
2018-10-30 04:48:53 INFO Model Page : User id - TEST12345
2018-10-30 04:48:56 INFO Dashboard Page : setmodel
2018-10-30 05:26:50 INFO About Page : setmodel
Code:
logfile_opts = {
logDirectory:'logs', // NOTE: folder must exist and be writable...
fileNamePattern:'pheal-.log',
timestampFormat:'YYYY-MM-DD HH:mm:ss'
}
It create a file and write a log. everything is working.
The problem is log written in single line. but, i need to write every log in separate line.
My log file:
2018-10-30 04:48:43 INFO Start 2018-10-30 04:48:53 INFO Model Page : User id - TEST12345 2018-10-30 04:48:56 INFO Dashboard Page : setmodel 2018-10-30 05:26:50 INFO About Page : setmodel
Expected output:
2018-10-30 04:48:43 INFO Start
2018-10-30 04:48:53 INFO Model Page : User id - TEST12345
2018-10-30 04:48:56 INFO Dashboard Page : setmodel
2018-10-30 05:26:50 INFO About Page : setmodel
Code:
logfile_opts = {
logDirectory:'logs', // NOTE: folder must exist and be writable...
fileNamePattern:'pheal-.log',
timestampFormat:'YYYY-MM-DD HH:mm:ss'
}
const logger = require('simple-node-logger').createRollingFileLogger( logfile_opts );
// const log = require('simple-node-logger').createSimpleLogger();
logger.info('Start');
logger.info('Model Page : User id - TEST12345');
logger.info('Dashboard Page : setmodel');
logger.info('About Page : setmodel');
The text was updated successfully, but these errors were encountered: