[ 
https://issues.apache.org/jira/browse/ARTEMIS-4785?focusedWorklogId=928879&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-928879
 ]

ASF GitHub Bot logged work on ARTEMIS-4785:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Aug/24 10:10
            Start Date: 06/Aug/24 10:10
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #5127:
URL: https://github.com/apache/activemq-artemis/pull/5127#discussion_r1705276839


##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java:
##########
@@ -77,6 +77,7 @@ public class Create extends InstallAbstract {
    public static final String BIN_ARTEMIS_SERVICE = "bin/" + ARTEMIS_SERVICE;
    public static final String ETC_ARTEMIS_PROFILE = "artemis.profile";
    public static final String ETC_LOG4J2_PROPERTIES = "log4j2.properties";
+   public static final String ETC_LOG4J2_DEFAULT_PROPERTIES = 
"log4j2-default.properties";

Review Comment:
   My point is that it feels like 'log4j2-default' isnt a very clear 
descriptive name for everyone else and could easily be misunderstood. I know 
that we will understand what its for, but it seems like something others could 
misinterpret, i.e those who havent seen the Jira/this discussion/this PR to 
understand exactly why that file is being created and what that file is not 
used for. Especially when in actual Log4J2 terms the existing log4j2.properties 
is actually 'the default file' (to Log4J it is the highest preendence non-test 
configuration file, and what will get used if you dont specify 
-Dlog4j2.configurationFile=foo). Something more descriptive of its usage like 
e.g log4j2-tools/utilities/foo.properties makes more explicit what the file is 
being aimed at than just a '-default' suffix.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 928879)
    Time Spent: 1h  (was: 50m)

> log4j config from classpath and cli issue
> -----------------------------------------
>
>                 Key: ARTEMIS-4785
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4785
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.33.0
>            Reporter: Gary Tully
>            Assignee: Domenico Francesco Bruscino
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> I have come across a strange issue where the root cause is the instance dir 
> cli sharing the log4j config with the broker.
> the logging has a rolling file appender schedual of 1 minute. looks to be 
> working fine, then use instance-dir/bin/artemis produicer --user invalid to 
> generate logging... and the broker appender gets borked.
> The problem, the cli is reading the same log4j2 config from the etc dir on 
> the classpath.
> This is not ideal.
> One workaroud is to use the installation dir artemis for producer!consumer 
> commands.
> I wonder if we should use -Dlog4j.configuration to specify a file not on the 
> classpath for the broker. and leave etc off the classpath?
> I guess there are a few ways to solve this. but there is indeed a gotcha here.
> thoughts?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to