You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/06/24 12:30:02 UTC
[jira] [Commented] (LOG4J2-1814) Wrapper Generate$ExtendedLogger
name inconvenient on Linux
[ https://issues.apache.org/jira/browse/LOG4J2-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16061951#comment-16061951 ]
ASF subversion and git services commented on LOG4J2-1814:
---------------------------------------------------------
Commit d26353cbbb235637839820dc9366059ecec325af in logging-log4j2's branch refs/heads/master from rpopma
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=d26353c ]
LOG4J2-1814 added wrapper classes CustomLoggerGenerator and ExtendedLoggerGenerator to avoid class name with a dollar ($) character which has special meaning in many *nix command line environments
> Wrapper Generate$ExtendedLogger name inconvenient on Linux
> -----------------------------------------------------------
>
> Key: LOG4J2-1814
> URL: https://issues.apache.org/jira/browse/LOG4J2-1814
> Project: Log4j 2
> Issue Type: Improvement
> Reporter: Remko Popma
> Assignee: Remko Popma
> Fix For: 2.9
>
>
> The $ExtendedLogger is interpreted as an environment variable.
> {code}
> $ java -cp log4j-core-2.8.jar org.apache.logging.log4j.core.tools.Generate$ExtendedLogger \
> com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
> Error: Main method not found in class org.apache.logging.log4j.core.tools.Generate, please define the main method
> {code}
> The workaround is to quote the class name:
> {code}
> $ java -cp log4j-core-2.8.jar "org.apache.logging.log4j.core.tools.Generate$ExtendedLogger" \
> com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)