How to setup log4j
Where I try CQ connector.
D:\RTC_beta2\JazzCQConnector-0.6Beta2 \jazz\connectors\gateway>synctool.bat -Dcq.query.Defect="Public Queries/All_Defect"
Running SyncTool...
log4j:WARN No appenders could be found for logger (com.ibm.rational.interop.detail).
log4j:WARN Please initialize the log4j system properly.
Trying to login to http://139.25.106.34:9080/jazz ...
Successfully logged in.
I really need more log information, but how to setup log4j.
D:\RTC_beta2\JazzCQConnector-0.6Beta2 \jazz\connectors\gateway>synctool.bat -Dcq.query.Defect="Public Queries/All_Defect"
Running SyncTool...
log4j:WARN No appenders could be found for logger (com.ibm.rational.interop.detail).
log4j:WARN Please initialize the log4j system properly.
Trying to login to http://139.25.106.34:9080/jazz ...
Successfully logged in.
I really need more log information, but how to setup log4j.
6 answers
See message: https://jazz.net/forums/viewtopic.php?t=537
Cheers,
Geoff
hanjie_siemens wrote:
Cheers,
Geoff
hanjie_siemens wrote:
Where I try CQ connector.
D:\RTC_beta2\JazzCQConnector-0.6Beta2
\jazz\connectors\gateway>synctool.bat
-Dcq.query.Defect="Public Queries/All_Defect"
Running SyncTool...
log4j:WARN No appenders could be found for logger
(com.ibm.rational.interop.detail).
log4j:WARN Please initialize the log4j system properly.
Trying to login to http://139.25.106.34:9080/jazz ...
Successfully logged in.
I really need more log information, but how to setup log4j.
Yeah. before I sent my original post
I have done the setting up according to link U mentioned.
I also tried to start my command in
D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway>synctool.bat -Dcq.query.Defect="Public Queries/All_Defect
-Dlog4j.configuration=file://"D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway\log4j.properties"
But system error is
log4j:ERROR Ignoring configuration file .
I have done the setting up according to link U mentioned.
I also tried to start my command in
D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway>synctool.bat -Dcq.query.Defect="Public Queries/All_Defect
-Dlog4j.configuration=file://"D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway\log4j.properties"
But system error is
log4j:ERROR Ignoring configuration file .
Here is the content of file log4j.properties under <cq_connector>/gateway
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %-50.50c - %m%n
log4j.logger.com.ibm.rational.interop=DEBUG
log4j.logger.com.ibm.rational.interop.detail=DEBUG
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %-50.50c - %m%n
log4j.logger.com.ibm.rational.interop=DEBUG
log4j.logger.com.ibm.rational.interop.detail=DEBUG
The example you tried below will not work because log4j does not
understand URI syntax for its configuration file (i.e. the "file://..."
syntax).
Let's first get logging working for your gateway (server.startup.bat),
and then we can work on logging for the importer (synctool.bat).
To keep things simple, let's assume you will cd to the gateway
directory, and then invoke server.startup.bat ... i.e.:
cd ...\jazz\connectors\gateway
server.startup.bat
and not:
...\jazz\connectors\gateway\server.startup.bat
Then you can just define the log4j.properties file as:
-Dlog4j.configuration=log4j.properties
So your ...\jazz\connectors\gatewayserver.startup.bat file should look like:
-Dlog4j.configuration=log4j.properties
and your ...\jazz\connectors\gateway\log4j.properties file should look like:
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p
%-50.50c - %m%n
log4j.logger.com.ibm.team.interop.service.outgoingSyncJob=DEBUG
log4j.logger.com.ibm.team.interop=DEBUG
log4j.logger.com.ibm.rational.interop=DEBUG
log4j.logger.com.ibm.rational.interop.detail=OFF
Cheers,
Geoff
hanjie_siemens wrote:
understand URI syntax for its configuration file (i.e. the "file://..."
syntax).
Let's first get logging working for your gateway (server.startup.bat),
and then we can work on logging for the importer (synctool.bat).
To keep things simple, let's assume you will cd to the gateway
directory, and then invoke server.startup.bat ... i.e.:
cd ...\jazz\connectors\gateway
server.startup.bat
and not:
...\jazz\connectors\gateway\server.startup.bat
Then you can just define the log4j.properties file as:
-Dlog4j.configuration=log4j.properties
So your ...\jazz\connectors\gatewayserver.startup.bat file should look like:
set JRE_HOME="%cd%"\win32\ibm-java2-i386-50\jre
set CATALINA_HOME="%cd%"\tomcat
set
CATALINA_OPTS=-Dcom.ibm.rational.interop.gateway.configURL="file:///"%cd%"/cqconnector.properties"
-Dlog4j.configuration=log4j.properties
set JAVA_OPTS=-Xmx700M
%CATALINA_HOME%\bin\startup.bat
and your ...\jazz\connectors\gateway\log4j.properties file should look like:
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p
%-50.50c - %m%n
log4j.logger.com.ibm.team.interop.service.outgoingSyncJob=DEBUG
log4j.logger.com.ibm.team.interop=DEBUG
log4j.logger.com.ibm.rational.interop=DEBUG
log4j.logger.com.ibm.rational.interop.detail=OFF
Cheers,
Geoff
hanjie_siemens wrote:
Yeah. before I sent my original post
I have done the setting up according to link U mentioned.
I also tried to start my command in
D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway>synctool.bat
-Dcq.query.Defect="Public Queries/All_Defect
-Dlog4j.configuration=file://"D:\RTC_beta2\JazzCQConnector-0.6Beta2\jazz\connectors\gateway\log4j.properties"
But system error is
log4j:ERROR Ignoring configuration file
.
The log messages will appear on whatever is considered to be the
"standard output" for the application generating the log information.
With the CQ Gateway on Windows, that would be the command window that
gets created when you run the gateway server.startup.bat script.
Cheers,
Geoff
hanjie_siemens wrote:
"standard output" for the application generating the log information.
With the CQ Gateway on Windows, that would be the command window that
gets created when you run the gateway server.startup.bat script.
Cheers,
Geoff
hanjie_siemens wrote:
Ok. I setup my environment with your instruction.
And then Where I should find the log informaiton.
(sorry, I am a freshman of log4j)