Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1749

log4j.configuration system property cannot be set

    XMLWordPrintable

Details

    • Hide

      1) Set JVM_PARAMS environment variable to -Dlog4j.configuration=/path/to/file/my-log4j.xml
      2) Start server

      Server will read in ${ISPN_HOME}/etc/log4j.xml rather than the file specified in JVM_PARAMS

      Show
      1) Set JVM_PARAMS environment variable to -Dlog4j.configuration=/path/to/file/my-log4j.xml 2) Start server Server will read in ${ISPN_HOME}/etc/log4j.xml rather than the file specified in JVM_PARAMS

    Description

      Although the startServer.sh script provides a way to specify custom system properties, via the JVM_PARAMS environment variable, it is not possible to specify a different log4j configuration file through the log4j.configuration system property because it will be overridden in functions.sh (see script snippet below, starting at line 154 of functions.sh). I think the portion of functions.sh that sets the location of the log4j configuration file should only execute if the user hasn't provided their own location.

      1. Log4J config path needs path conversion in Cygwin
        if $CYGWIN; then
        LOG4J_CONFIG=`cygpath -w "${ISPN_HOME}/etc/log4j.xml"`
        else
        LOG4J_CONFIG=${ISPN_HOME}/etc/log4j.xml
        fi
        START_ARGS=( "${START_ARGS[@]}" "-Dlog4j.configuration=file:///$LOG4J_CONFIG" )

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            david.vanbalen@amentra.com David van Balen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: