java - Log messages are not written in the log file -



java - Log messages are not written in the log file -

i have configured project log4j. have configured log4j using log4.properties file. while test runs creates mylog.log file nil written log file. appender using rollingfileappender , log4j.rootlogger=debug.

can 1 suggest might causing problem?

here log4j.properties project.

log4j.rootlogger= debug, consoleappender, rolling log4j.appender.consoleappender=org.apache.log4j.consoleappender log4j.appender.consoleappender.layout=org.apache.log4j.patternlayout log4j.appender.consoleappender.layout.conversionpattern=%d %-2p %c.%m(): %m%n log4j.appender.rolling=org.apache.log4j.rollingfileappender log4j.appender.rolling.maxfilesize=5mb log4j.appender.rolling.maxbackupindex=2 log4j.appender.rolling.file=d:\logs\myproj.log log4j.appender.rolling.layout = org.apache.log4j.patternlayout log4j.appender.rolling.layout.conversionpattern=%d %-4p %c.%m(): %m%n ## next 2 lines have been removed now. log4j.logger.com=warn log4j.logger.org=warn

received log in log file :

2012-01-16 22:02:08,534 debug org.apache.http.headers.receiveresponseheader(): << content-type: application/json; charset=utf-8 2012-01-16 22:02:08,534 debug org.apache.http.headers.receiveresponseheader(): << connection: close 2012-01-16 22:02:08,534 debug org.apache.http.headers.receiveresponseheader(): << content-length: 236 2012-01-16 22:02:08,550 debug org.apache.http.headers.receiveresponseheader(): << server: httpd.js 2012-01-16 22:02:08,550 debug org.apache.http.headers.receiveresponseheader(): << date: tue, 17 jan 2012 03:02:06 gmt 2012-01-16 22:02:08,566 debug org.apache.http.wire.wire(): << "{"name":"clickelement","sessionid":"2fad55cf-670e-44f3-ab60-7d2f76f641e6","status":0,"value":"this action final , cannot undone?"}" 2012-01-16 22:02:08,566 debug org.apache.http.impl.conn.defaultclientconnection.shutdown(): connection shut downwards 2012-01-16 22:02:08,566 debug org.apache.http.impl.conn.tsccm.threadsafeclientconnmanager.releaseconnection(): released connection not reusable. 2012-01-16 22:02:08,566 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.freeentry(): releasing connection [httproute[{}->http://127.0.0.1:7055]][null] 2012-01-16 22:02:08,566 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.notifywaitingthread(): notifying no-one, there no waiting threads 2012-01-16 22:02:10,566 debug org.apache.http.impl.conn.tsccm.threadsafeclientconnmanager.getconnection(): connection: httproute[{}->http://127.0.0.1:7055], timeout = 120000 2012-01-16 22:02:10,566 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.getentryblocking(): [httproute[{}->http://127.0.0.1:7055]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 2012-01-16 22:02:10,566 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.getfreeentry(): no free connections [httproute[{}->http://127.0.0.1:7055]][null] 2012-01-16 22:02:10,566 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.getentryblocking(): available capacity: 2000 out of 2000 [httproute[{}->http://127.0.0.1:7055]][null] 2012-01-16 22:02:10,581 debug org.apache.http.impl.conn.tsccm.connpoolbyroute.createentry(): creating new connection [httproute[{}->http://127.0.0.1:7055]] 2012-01-16 22:02:10,597 debug org.apache.http.impl.conn.defaultclientconnectionoperator.openconnection(): connecting 127.0.0.1:7055 2012-01-16 22:02:10,597 debug org.apache.http.client.protocol.requestaddcookies.process(): cookiespec selected: best-match 2012-01-16 22:02:10,597 debug org.apache.http.client.protocol.requestauthcache.process(): auth cache not set in context 2012-01-16 22:02:10,597 debug org.apache.http.impl.client.defaulthttpclient.tryexecute(): effort 1 execute request 2012-01-16 22:02:10,597 debug org.apache.http.impl.conn.defaultclientconnection.sendrequestheader(): sending request: /hub/session/2fad55cf-670e-44f3-ab60-7d2f76f641e6/alert_text http/1.1 2012-01-16 22:02:10,597 debug org.apache.http.wire.wire(): >> "get /hub/session/2fad55cf-670e-44f3-ab60-7d2f76f641e6/alert_text http/1.1[\r][\n]" 2012-01-16 22:02:10,597 debug org.apache.http.wire.wire(): >> "accept: application/json, image/png[\r][\n]" 2012-01-16 22:02:10,597 debug org.apache.http.wire.wire(): >> "host: 127.0.0.1:7055[\r][\n]" 2012-01-16 22:02:10,597 debug org.apache.http.wire.wire(): >> "connection: keep-alive[\r][\n]" 2012-01-16 22:02:10,597 debug org.apache.http.wire.wire(): >> "[\r][\n]" 2012-01-16 22:02:10,597 debug org.apache.http.headers.sendrequestheader(): >> /hub/session/2fad55cf-670e-44f3-ab60-7d2f76f641e6/alert_text http/1.1 2012-01-16 22:02:10,597 debug org.apache.http.headers.sendrequestheader(): >> accept: application/json, image/png 2012-01-16 22:02:10,597 debug org.apache.http.headers.sendrequestheader(): >> host: 127.0.0.1:7055 2012-01-16 22:02:10,597 debug org.apache.http.headers.sendrequestheader(): >> connection: keep-alive 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "http/1.1 200 ok[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "content-type: application/json; charset=utf-8[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "connection: close[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "content-length: 236[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "server: httpd.js[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "date: tue, 17 jan 2012 03:02:10 gmt[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.wire.wire(): << "[\r][\n]" 2012-01-16 22:02:10,612 debug org.apache.http.impl.conn.defaultclientconnection.receiveresponseheader(): receiving response: http/1.1 200 ok

or more detailed: no logging-request com or org-packages log-level < warn enabled. wont forwarded rootlogger.

quote:

a log request of level p in logger (either assigned or inherited, whichever appropriate) level q, enabled if p >= q.

and

each enabled logging request given logger forwarded appenders in logger appenders higher in hierarchy.

see: http://logging.apache.org/log4j/1.2/manual.html

java junit log4j

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -