Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4986

Allow users to customize the Drill log file name

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      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:

      export DRILL_LOG_PREFIX="$DRILL_LOG_DIR/drillbit"
      

      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 "

      export DRILL_LOG_PREFIX=${DRILL_LOG_PREFIX:-"drillbit"}
      

      and then the next line that makes the drill log path should be:

      export DRILLBIT_LOG_PATH="${DRILL_LOG_DIR}/${DRILL_LOG_PREFIX}.log"
      

      That way the Prefix is just a file prefix, and then in the drill-env.sh I
      could set

      export DRILL_LOG_PREFIX="drillbit-$HOSTNAME"
      

      and have all my logs in one folder, but not be overwritten by easy other....

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paul-rogers Paul Rogers
                Reporter:
                paul-rogers Paul Rogers
                Reviewer:
                Boaz Ben-Zvi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: