Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-5235

Add support for customizing the location of the JSW log file

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.2
    • Fix Version/s: None
    • Component/s: Bootstrap
    • Labels:
      None

      Description

      Currently the JSW log is defined as ${NEXUS_HOME}/logs/wrapper.log:

      From "wrapper.conf"
      # Set up JSW logging
      wrapper.logfile=logs/wrapper.log
      

      This locates the wrapper log within the installation (the "binaries") of the Nexus distribution.

      By introducing a JSW environment variable (with a reasonable default value) for the log directory the wrapper log file location could be customized externally with an environment variable:

      Add new JSW environment variable in "wrapper.conf"
      # Default directory for JSW logging
      set.default.LOG_DIR=./logs
      
         :
      
      # Set up JSW logging
      wrapper.logfile=%LOG_DIR%/wrapper.log
      

      The Nexus JSW scripts have to be tweaked to add this property to the JSW commandline :

      Add preparation of new JSW environment variable in Nexus scripts
      # Build the log directory clause.
      LOGDIRPROP=
      if [ "X$LOG_DIR" != "X" ]
      then
          LOGDIRPROP=set.LOG_DIR=$LOG_DIR
      fi
      
        :
      
      # The string passed to eval must handles spaces in paths correctly.
      COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" $ANCHORPROP $LOCKPROP $LOGDIRPROP"
      
        :
      
      # The string passed to eval must handles spaces in paths correctly.
      COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP $LOGDIRPROP"
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tjuerge Torsten Juergeleit
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title