This is an automated email from the ASF dual-hosted git repository.

maoling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 006d9f0  ZOOKEEPER-4190: Allow log file name to be changed
006d9f0 is described below

commit 006d9f0da6d46183995cf98c43348364bbdeed9c
Author: tritrimax <[email protected]>
AuthorDate: Sun Jan 24 02:14:31 2021 +0800

    ZOOKEEPER-4190: Allow log file name to be changed
    
    At the moment the name of the log file is hardcoded and cannot be changed.
    With this update, if the variable ZOO_LOG_FILE is present in 
zookeeper-env.sh, the name of the file can be changed.
    
    Author: tritrimax <[email protected]>
    
    Reviewers: Michael Han <[email protected]>, Enrico Olivelli 
<[email protected]>, tison <[email protected]>, maoling 
<[email protected]>
    
    Closes #1439 from tritrimax/patch-1
---
 bin/zkServer.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/zkServer.sh b/bin/zkServer.sh
index a4aa9f3..c91216b 100755
--- a/bin/zkServer.sh
+++ b/bin/zkServer.sh
@@ -149,7 +149,7 @@ if [ ! -w "$ZOO_LOG_DIR" ] ; then
 mkdir -p "$ZOO_LOG_DIR"
 fi
 
-ZOO_LOG_FILE=zookeeper-$USER-server-$HOSTNAME.log
+ZOO_LOG_FILE=${ZOO_LOG_FILE:-zookeeper-$USER-server-$HOSTNAME.log}
 _ZOO_DAEMON_OUT="$ZOO_LOG_DIR/zookeeper-$USER-server-$HOSTNAME.out"
 
 case $1 in

Reply via email to