You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org> on 2006/10/03 16:47:21 UTC

[jira] Created: (QPID-13) Add option to include prefix and suffix in log file name for broker

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
         Environment: All
            Reporter: Marnie McCormack


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 qish 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

        

[jira] Assigned: (QPID-13) Add option to include prefix and suffix in log file name for broker

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-13?page=all ]

Marnie McCormack reassigned QPID-13:
------------------------------------

    Assignee: Marnie McCormack

> 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
>         Environment: All
>            Reporter: Marnie McCormack
>         Assigned To: Marnie McCormack
>
> 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 qish 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

        

[jira] Resolved: (QPID-13) Add option to include prefix and suffix in log file name for broker

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
     [ 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

        

[jira] Commented: (QPID-13) Add option to include prefix and suffix in log file name for broker

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
    [ 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

        

[jira] Updated: (QPID-13) Add option to include prefix and suffix in log file name for broker

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-13?page=all ]

Marnie McCormack updated QPID-13:
---------------------------------

        Fix Version/s: M1
          Description: 
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 .......

  was:
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 qish 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 .......

    Affects Version/s: M1

> 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