You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2007/05/25 04:40:22 UTC

DO NOT REPLY [Bug 42516] New: - Log4j failed to log file when packaged in Eclipse plugin

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42516>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42516

           Summary: Log4j failed to log file when packaged in Eclipse plugin
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: guyi@cn.ibm.com


I developed a Eclipse plugin and use log4j to generate the log file. It is Okay
when I ran application in Debug mode by copying all the files directly to
Eclipse/plugin folder. After I packaged the whole plugin into a jar file and run
the plugin through the jar, the log4j failed to output. Only an empty log file
is generated without any content. 
Could someone look into this problem?
Because we are developing a commercial software, I can not upload my application
as attachment. The problem can be reproduced by creating another Eclipse plugin.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 42516] - Log4j failed to log file when packaged in Eclipse plugin

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42516>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42516





------- Additional Comments From hoju@visi.com  2007-05-24 21:38 -------
You would do yourself and us a favor by bringing this up on the Log4j-user list
instead of immediately reporting this as a bug.  In any case, how do you
configure Log4j?  Do you use a config file or just code?  If the former, where
do you put the config file?  Do you use auto configuration or manual
configuration?  Do you use a repository selector?  Any other details that might
help us narrow down the issue?

Jake

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 42516] - Log4j failed to log file when packaged in Eclipse plugin

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42516>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42516


carnold@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 42516] - Log4j failed to log file when packaged in Eclipse plugin

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42516>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42516





------- Additional Comments From guyi@cn.ibm.com  2007-05-24 21:48 -------
Thanks for the comment.
I use a property file for log4j. It is also packaged in the Eclipse plugin. 
The content of file is:
log4j.rootLogger=debug, MyProject

log4j.appender.ConvTool=org.apache.log4j.RollingFileAppender
log4j.appender.ConvTool.File=logs/conversion.log
log4j.appender.ConvTool.MaxFileSize=1MB
log4j.appender.ConvTool.MaxBackupIndex=5
log4j.appender.ConvTool.layout=org.apache.log4j.PatternLayout
log4j.appender.ConvTool.layout.ConversionPattern=%p %d [%t] %c - %m%n

It is placed under config folder. And I use 
PropertyConfigurator.configure(ConversionLogger.class.getClassLoader()
                .getResource("config/log4j.properties"));
to load the property.


(In reply to comment #1)
> You would do yourself and us a favor by bringing this up on the Log4j-user 
list
> instead of immediately reporting this as a bug.  In any case, how do you
> configure Log4j?  Do you use a config file or just code?  If the former, where
> do you put the config file?  Do you use auto configuration or manual
> configuration?  Do you use a repository selector?  Any other details that 
might
> help us narrow down the issue?
> Jake



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org