[ https://issues.apache.org/jira/browse/DRILL-4986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15627243#comment-15627243 ]
ASF GitHub Bot commented on DRILL-4986: --------------------------------------- GitHub user paul-rogers opened a pull request: https://github.com/apache/drill/pull/641 DRILL-4986: Allow customization of the Drill log file name Adds a new user-settable environment variable to choose the log file base name. Tested using automated script unit tests that validate both this new option and all the functionality of the scripts as updated in a prior PR. You can merge this pull request into a Git repository by running: $ git pull https://github.com/paul-rogers/drill DRILL-4986 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/641.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #641 ---- commit d5151b3d1b2491d0956b877a0caf6729f7ad4dc6 Author: Paul Rogers <prog...@maprtech.com> Date: 2016-11-01T18:26:03Z DRILL-4986: Allow users to customize the Drill log file name Adds a new user-settable environment variable to choose the log file base name. ---- > Allow users to customize the Drill log file name > ------------------------------------------------ > > Key: DRILL-4986 > URL: https://issues.apache.org/jira/browse/DRILL-4986 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.8.0 > Reporter: Paul Rogers > Priority: Minor > Fix For: 1.9.0 > > > From John Omernik on the user list: > I am getting my head around the new Drill config files in 1.8, and I have > been setting DRILL_LOG_PREFIX in previous versions. Based on what I am > seeing in drill-config.sh though, it looks like I no longer can set this as > instead of using a "If set use what's set otherwise default to" methodology > like other variables, drill-config.sh just exports a static value... is > this correct? > My goal is to have logs all in a single directory but have prefixes based > on the host names... "centralized" logging if you will :) > Suggestion: > {code} > export DRILL_LOG_PREFIX="$DRILL_LOG_DIR/drillbit" > {code} > So looking at this, I think that DRILL_LOG_PREFIX is a misnomer, it should > be DRILL_LOG_PATH = Path to a directory, DRILL_LOG_PREFIX = A prefix to > prepend to drill log files, thus, in reality, DRILL_LOG_PREFIX should not > be set to $DRILL_LOG_DIR/drillbit, instead the default should be " > {code} > export DRILL_LOG_PREFIX=${DRILL_LOG_PREFIX:-"drillbit"} > {code} > and then the next line that makes the drill log path should be: > {code} > export DRILLBIT_LOG_PATH="${DRILL_LOG_DIR}/${DRILL_LOG_PREFIX}.log" > {code} > That way the Prefix is just a file prefix, and then in the drill-env.sh I > could set > {code} > export DRILL_LOG_PREFIX="drillbit-$HOSTNAME" > {code} > and have all my logs in one folder, but not be overwritten by easy other.... -- This message was sent by Atlassian JIRA (v6.3.4#6332)