How to configure log4js in protractor -
can suggest how configure log4js in protractor config. when use
var log4js = require('log4js');var logger = log4js.getlogger();
im able print logs in console. want configure log4js logs file.
please see link
- install log4j npm
- configure in conf.js - appender section
- declare in main.js / main entry of program
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
Comments
Post a Comment