Can anyone suggest how to configure log4js in protractor config. When i use
var log4js = require('log4js');var logger = log4js.getLogger();
im able to print the logs in the console. But i want to configure the log4js to get the logs to a file.
Can anyone suggest how to configure log4js in protractor config. When i use
var log4js = require('log4js');var logger = log4js.getLogger();
im able to print the logs in the console. But i want to configure the log4js to get the logs to a file.
Please see this link
add logging in scripts
var log4js = require('log4js');
log4js.loadAppender('file'); log4js.addAppender(log4js.appenders.file('data.log'), 'logs'); var logger = log4js.getLogger('logs'); logger.info('Started testcases ');
http://247knowledge.blogspot.in/2014/07/logger-in-protractor-e2e-testing.html