[
https://issues.apache.org/jira/browse/LOG4J2-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remko Popma updated LOG4J2-1814:
--------------------------------
Description:
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}
was:
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}
> 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
>
> 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.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]