[ https://issues.apache.org/jira/browse/ARTEMIS-4785?focusedWorklogId=929410&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-929410 ]
ASF GitHub Bot logged work on ARTEMIS-4785: ------------------------------------------- Author: ASF GitHub Bot Created on: 08/Aug/24 13:54 Start Date: 08/Aug/24 13:54 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #5136: URL: https://github.com/apache/activemq-artemis/pull/5136#discussion_r1709562452 ########## artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis-utility.profile: ########## @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARTEMIS_HOME='${artemis.home}' +ARTEMIS_INSTANCE='@artemis.instance@' +ARTEMIS_DATA_DIR='${artemis.instance.data}' +ARTEMIS_ETC_DIR='${artemis.instance.etc}' +ARTEMIS_OOME_DUMP='${artemis.instance.oome.dump}' + +# The logging config will need an URI +# this will be encoded in case you use spaces or special characters +# on your directory structure +ARTEMIS_INSTANCE_URI='${artemis.instance.uri}' +ARTEMIS_INSTANCE_ETC_URI='${artemis.instance.etc.uri}' + +# Java Opts +if [ -z "$JAVA_ARGS" ]; then + JAVA_ARGS="-Dlog4j2.configurationFile=${ARTEMIS_INSTANCE_ETC_URI}log4j2-utility.properties ${java-opts}" +fi Review Comment: +1 Issue Time Tracking ------------------- Worklog Id: (was: 929410) Time Spent: 2h 20m (was: 2h 10m) > 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: 2h 20m > 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