[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341264#comment-16341264
 ] 

Hal Duston edited comment on ZOOKEEPER-2626 at 1/26/18 4:51 PM:
----------------------------------------------------------------

I do not know if this is the preferred solution, but adding the line 
*"-Dlog4j.configuration=[file:$|file://%24/]{ZOOCFGDIR}/log4j.properties" * to 
all supplied _zk_ scripts immediately preceding each line beginning* -cp 
"$CLASSPATH"* causes _log4j.properties_ to be recognized.  This is for version 
3.4.9.


was (Author: hald):
I do not know if this is the preferred solution, but adding the line 
*"-Dlog4j.configuration=file:${ZOOCFGDIR}/log4j.properties" \* to all supplied 
_zk_ scripts immediately preceding each line beginning *-cp "$CLASSPATH"* 
causes _log4j.properties_ to be recognized.

> log4j.properties don't get respected
> ------------------------------------
>
>                 Key: ZOOKEEPER-2626
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2626
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.5.2
>         Environment: Linux vagrant-ubuntu-trusty-32 3.13.0-100-generic 
> #147-Ubuntu SMP Tue Oct 18 16:49:53 UTC 2016 i686 i686 i686 GNU/Linux
>            Reporter: Arne Bachmann
>            Priority: Major
>
> I put the log4j.properties into the conf folder, plus a symlink to the base 
> zookeeper folder, as described in the documentation.
> Neither of them seem to be picked up, as my rolling logger is not recognized 
> (no logs created), and also bin/zkServer.sh print-cmd shows wrong logger 
> configuration. Is that a problem of the start script or did I put the 
> properties file into the wrong place?
> Note however, that also my additional java command-line options (from 
> JAVA_TOOL_OPTIONS) don't get picked up by the start script, as can be seen by 
> ps aux | grep java (e.g. -Xmx1000m instead of -Xmx500 as I defined it).
> The script's refer to a lot of environment variables that aren't explained in 
> the documentation and nowhere defined; I can't get it to run.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to