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 "A B (JIRA)" <ji...@apache.org> on 2015/03/01 14:06:04 UTC
[jira] [Comment Edited] (LOG4J2-776) Using custom path and file
name for log4j2 config file in EJB3
[ https://issues.apache.org/jira/browse/LOG4J2-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14342215#comment-14342215 ]
A B edited comment on LOG4J2-776 at 3/1/15 1:05 PM:
----------------------------------------------------
One question though - according to http://stackoverflow.com/questions/16716556/how-to-specify-log4j-2-x-config-location - Remko Popma has indicated this - *Be aware that this class is not part of the public API so your code may break with any minor release.*
So the question is - Can this be relied on to not break the code with version changes?
Thank you
was (Author: adbdkb):
One question though - according to http://stackoverflow.com/questions/16716556/how-to-specify-log4j-2-x-config-location - Remko Popma
has indicated this - Be aware that this class is not part of the public API so your code may break with any minor release. -
So the question is - Can this be relied on to not break the code with version changes?
Thank you
> Using custom path and file name for log4j2 config file in EJB3
> --------------------------------------------------------------
>
> Key: LOG4J2-776
> URL: https://issues.apache.org/jira/browse/LOG4J2-776
> Project: Log4j 2
> Issue Type: New Feature
> Components: Configurators
> Affects Versions: 2.0.1
> Environment: Windows 7, Websphere 8.5, EJB 3.1
> Reporter: A B
>
> When using log4j ( 1.x ) with EJB, you could define / set / load the custom log4j configuration file and define the location of the configuration file by using the @Startup bean with @PostConstruct and then call PropertyConfigurator.configure(log4jProp); to load the configuration where log4jProp would be the location AND filename for the config file
> Since the above method is not valid in log4j2, what method / mechanism should be used to load a specific configuration in an EJB3 module?
> Also, how can I use an environment / system variable to define the configuration file name ( as done in Jira item 747 for log4j for a servlet )?
> Thank you,
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org