[ http://issues.apache.org/jira/browse/QPID-13?page=all ]

Marnie McCormack resolved QPID-13.
----------------------------------

    Resolution: Fixed

Amended qpid-run to handle QPID_LOG_PREFIX and QPID_LOG_SUFFIX environment 
variables. 

If set one of these variables to the value PID then the script will set the 
appropriate system property to the PID of the java process at runtime.

Otherwise, values simply passed through unchanged to command line.

Amended qpid-run to use SYSTEM_PROPS variable for all -D properties.

If don't set QPID_LOG_PREFIX or QPID_LOG_SUFFIX then log file name is simply 
qpid.log as now.

Altered log4j.xml to introduce logprefix and logsuffix for this purpose.


> 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

        

Reply via email to