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

  1. install log4j npm
  2. configure in conf.js - appender section
  3. declare in main.js / main entry of program
  4. 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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -