You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (Created) (JIRA)" <ji...@apache.org> on 2011/10/21 15:18:31 UTC
[jira] [Created] (FELIX-3180) Provide MessageFormat based logging
method
Provide MessageFormat based logging method
------------------------------------------
Key: FELIX-3180
URL: https://issues.apache.org/jira/browse/FELIX-3180
Project: Felix
Issue Type: Improvement
Components: Configuration Admin
Affects Versions: configadmin-1.2.8
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: configadmin-1.4.0
Currently there is only a single logging method in the ConfigurationManager class:
log(int level, String message, Throwable t)
This allows fixed strings to be logged at certain levels. If the messages are composed of dynamic content (e.g. configuration PIDs) this requires String concatenations and thus -- to prevent performance issues -- guarding the calls with isEnabled(int level) calls. This clutters the code.
To improve this situation a new logging method
log(int level, String format, Object[] args)
should be added where format is a MessageFormat pattern and args is the MessageFormat argument vector. The message is generated calling
MessageFormat.format(format, args)
and the result used as the message argument to the existing log method. If the last entry in the args array is a Throwable it is used as the Throwable argument to the log method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (FELIX-3180) Provide MessageFormat based logging
method
Posted by "Felix Meschberger (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved FELIX-3180.
--------------------------------------
Resolution: Fixed
Implemented in Rev. 1187346:
Provide MessageFormat based logging method
- adapt calls to the old log method benefitting from the new method
- remove unneeded isLogEnabled calls
- add some more debug logging
> Provide MessageFormat based logging method
> ------------------------------------------
>
> Key: FELIX-3180
> URL: https://issues.apache.org/jira/browse/FELIX-3180
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.2.8
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.4.0
>
>
> Currently there is only a single logging method in the ConfigurationManager class:
> log(int level, String message, Throwable t)
> This allows fixed strings to be logged at certain levels. If the messages are composed of dynamic content (e.g. configuration PIDs) this requires String concatenations and thus -- to prevent performance issues -- guarding the calls with isEnabled(int level) calls. This clutters the code.
> To improve this situation a new logging method
> log(int level, String format, Object[] args)
> should be added where format is a MessageFormat pattern and args is the MessageFormat argument vector. The message is generated calling
> MessageFormat.format(format, args)
> and the result used as the message argument to the existing log method. If the last entry in the args array is a Throwable it is used as the Throwable argument to the log method. The Throwable is not removed from the argument vector so may (theoretically) also be referred to in the format pattern.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3180) Provide MessageFormat based logging
method
Posted by "Felix Meschberger (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger updated FELIX-3180:
-------------------------------------
Description:
Currently there is only a single logging method in the ConfigurationManager class:
log(int level, String message, Throwable t)
This allows fixed strings to be logged at certain levels. If the messages are composed of dynamic content (e.g. configuration PIDs) this requires String concatenations and thus -- to prevent performance issues -- guarding the calls with isEnabled(int level) calls. This clutters the code.
To improve this situation a new logging method
log(int level, String format, Object[] args)
should be added where format is a MessageFormat pattern and args is the MessageFormat argument vector. The message is generated calling
MessageFormat.format(format, args)
and the result used as the message argument to the existing log method. If the last entry in the args array is a Throwable it is used as the Throwable argument to the log method. The Throwable is not removed from the argument vector so may (theoretically) also be referred to in the format pattern.
was:
Currently there is only a single logging method in the ConfigurationManager class:
log(int level, String message, Throwable t)
This allows fixed strings to be logged at certain levels. If the messages are composed of dynamic content (e.g. configuration PIDs) this requires String concatenations and thus -- to prevent performance issues -- guarding the calls with isEnabled(int level) calls. This clutters the code.
To improve this situation a new logging method
log(int level, String format, Object[] args)
should be added where format is a MessageFormat pattern and args is the MessageFormat argument vector. The message is generated calling
MessageFormat.format(format, args)
and the result used as the message argument to the existing log method. If the last entry in the args array is a Throwable it is used as the Throwable argument to the log method.
> Provide MessageFormat based logging method
> ------------------------------------------
>
> Key: FELIX-3180
> URL: https://issues.apache.org/jira/browse/FELIX-3180
> Project: Felix
> Issue Type: Improvement
> Components: Configuration Admin
> Affects Versions: configadmin-1.2.8
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.4.0
>
>
> Currently there is only a single logging method in the ConfigurationManager class:
> log(int level, String message, Throwable t)
> This allows fixed strings to be logged at certain levels. If the messages are composed of dynamic content (e.g. configuration PIDs) this requires String concatenations and thus -- to prevent performance issues -- guarding the calls with isEnabled(int level) calls. This clutters the code.
> To improve this situation a new logging method
> log(int level, String format, Object[] args)
> should be added where format is a MessageFormat pattern and args is the MessageFormat argument vector. The message is generated calling
> MessageFormat.format(format, args)
> and the result used as the message argument to the existing log method. If the last entry in the args array is a Throwable it is used as the Throwable argument to the log method. The Throwable is not removed from the argument vector so may (theoretically) also be referred to in the format pattern.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira