qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marnie McCormack (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Commented: (QPID-13) Add option to include prefix and suffix in log file name for broker
Date Fri, 20 Oct 2006 10:00:35 GMT
    [ http://issues.apache.org/jira/browse/QPID-13?page=comments#action_12443774 ] 
            
Marnie McCormack commented on QPID-13:
--------------------------------------

Users should set the following environment variables before running qpid-server:

QPID_LOG_PREFIX - will prefix the log file name with the specified value e.g. if you set this
value to be the name of your host (for example) it could look something like host123qpid.log

QPID_LOG_SUFFIX - will suffix the file name with the specified value e.g. if you set this
value to be the name of your application (for example) if could look something like qpidMyApp.log

** setting either of these variables to the special value PID will introduce the process id
of the java process into the file name as a prefix or suffix as specified**

The variables do not need to be set - the existing log file name will then be unchanged i.e.
qpid.log

> Add option to include prefix and suffix in log file name for broker
> -------------------------------------------------------------------
>
>                 Key: QPID-13
>                 URL: http://issues.apache.org/jira/browse/QPID-13
>             Project: Qpid
>          Issue Type: New Feature
>          Components: Java Broker
>    Affects Versions: M1
>         Environment: All
>            Reporter: Marnie McCormack
>         Assigned To: Marnie McCormack
>             Fix For: M1
>
>
> An end user has requested the ability to use the process id in the log file name for
the broker. This could make testing easier for the test team here by allowing them to identify
logs with processes.
> In fact, it would probably be better to allow users to set any system property that they
wish to be used in the log file name. This would also avoid our current scenario where two
brokers on the same host will log to the same file, rendering it unreadable in any useful
way.
> So, if they set a given system property name at runtime i.e. logprefix or logsuffix then
the log4j.xml config will pick that up and use it.
> If these properties are not set then the log name will remain as it currently is i.e.
qpid.log. However if they set, for example, the prefix to the pid (2701) and the suffix to
the servername (myhost) then the log name could be something like 2701qpidmyhost.log.
> To set the pid as a system property need to add a -D to the java command that starts
the broker i.e. -Dlogprefix=$$ (on unix). Might be more complex on linux and involve reading
the /proc/self/stat file. More details on this shortly .......

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message