回复: 回复:why can log4j2 not print on console in command window

2013-09-09 Thread 流子℡
anybody know why?

---原始邮件---
在 2013年09月09日 20:55:40
"41157121"<41157...@qq.com> 写道:
 
hi,the attachement is mytest project. can you help me to have a look the issue? 
thesource.jar is the source code , and product.rar is therelease version .
you can double click start.bat to run.


source.jar http://url.cn/WX6MH2
product.rar http://url.cn/JURine


when I run my project ,it works ok in eclipse,everything print ok in console. 
however,when i compile the project to jar ,and run it by start.bat ,log4j2 
can.t print output in cmd window,i can't catch the reason,pls help me. thank 
you!
thank you very much.
Regards.
Allen






-- 原始邮件 --
发件人: "Ralph Goers";;
发送时间: 2013年9月8日(星期天) 晚上11:53
收件人: "Log4J Users List"; 

主题: Re: 回复:why can log4j2 not print on console in command window



1. What does start.bat do? Can you post the source?
2. When you run from the command line from your jar where is the log4j2.xml 
file located?

Ralph

On Sep 8, 2013, at 8:36 AM, 流子℡ wrote:

> i use log4j2 as following:
> iimport org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> private static final Logger logger = LogManager.getLogger(OOXX.class);
> 
> 
> 
> 
> -- 原始邮件 --
> 发件人: "流子";<41157...@qq.com>;
> 发送时间: 2013年9月8日(星期天) 晚上11:32
> 收件人: "log4j-user-info"; 
> "log4j-user-faq"; 
> "log4j-user"; 
> 
> 主题: why can log4j2 not print on console in command window
> 
> 
> 
> I have use the version beta 8 for log4j2, I have third-party framework using 
> in my project ,e.g. spring which using slf4j.
> and i import the jars into my libaray :log4j-over-slf4j-1.7.5.jar 
> log4j-api-2.0-beta8.jar log4j-core-2.0-beta8.jarlog4j-slf4j-impl-2.0-beta8.jar
> 
> 
> and my java environment is JDK 7,my configration file named log4j2.xml is as 
> following :
>   name="LOG_HOME">/log/fish name="BACKUP_HOME">{LOG_HOME}/backup name="STAT_NAME">stat name="SERVER_NAME">globalpattern="%date{-MM-dd HH:mm:ss.SSS} %level [%thread][%file:%line] - 
> %msg%n" /> fileName="{SERVER_NAME}" filePattern="{SERVER_NAME}.%d{-MM-dd-HH}.log"> 
>   interval="1" modulate="true" />  fileName="{SERVER_NAME}_{LOG_HOME}/{STAT_NAME}.%d{-MM-dd-HH}.log"> 
>  [%thread][%file:%line] - %msg%n" />  interval="1" modulate="true" />   
>  level="info"> level="info"> level="info"> level="info"> level="warn"> level="warn"> name="com.u9.global.service.log" level="info" additivity="false"> 
>  level="DEBUG">   /> 
> 
> when I run my project ,it works ok in eclipse,everything print ok in console. 
> however,when i compile the project to jar ,and run it by start.bat ,log4j2 
> can.t print output in cmd window,i can't catch the reason,pls help me. thank 
> you!


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

.

Re: 回复:why can log4j2 not print on console in command window

2013-09-08 Thread Ralph Goers
1. What does start.bat do? Can you post the source?
2. When you run from the command line from your jar where is the log4j2.xml 
file located?

Ralph

On Sep 8, 2013, at 8:36 AM, ?Y wrote:

> i use log4j2 as following:
> iimport org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> private static final Logger logger = LogManager.getLogger(OOXX.class);
> 
> 
> 
> 
> --  --
> ??: "";<41157...@qq.com>;
> : 2013??9??8??(??) 11:32
> ??: "log4j-user-info"; 
> "log4j-user-faq"; 
> "log4j-user"; 
> 
> : why can log4j2 not print on console in command window
> 
> 
> 
> I have use the version beta 8 for log4j2, I have third-party framework using 
> in my project ,e.g. spring which using slf4j.
> and i import the jars into my libaray :log4j-over-slf4j-1.7.5.jar 
> log4j-api-2.0-beta8.jar log4j-core-2.0-beta8.jar  
> log4j-slf4j-impl-2.0-beta8.jar
> 
> 
> and my java environment is JDK 7,my configration file named log4j2.xml is as 
> following :
>   
> /log/fish
>   name="BACKUP_HOME">{LOG_HOME}/backupname="STAT_NAME">stat   name="SERVER_NAME">global  
>
> 
>  fileName="${LOG_HOME}/${SERVER_NAME}"
> filePattern="${LOG_HOME}/${SERVER_NAME}.%d{-MM-dd-HH}.log">   
>
>  />   
>   fileName="${LOG_HOME}/${SERVER_NAME}_${STAT_NAME}"
>   
> filePattern="${LOG_HOME}/${SERVER_NAME}_${STAT_NAME}.%d{-MM-dd-HH}.log">  
>pattern="%date{-MM-dd HH:mm:ss.SSS} %level [%thread][%file:%line] - 
> %msg%n" />
>  modulate="true" />   
>  level="info">   name="org.springframework.beans" level="info">   
>   
>  
>   level="warn">name="org.apache.http" level="warn">   level="info"   additivity="false"> 
>   
> />   
> 
> when I run my project ,it works ok in eclipse,everything print ok in console. 
> however,when i compile the project to jar ,and run it by start.bat ,log4j2 
> can.t print output in cmd window,i can't catch the reason,pls help me. thank 
> you!


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org