You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mailet-api@james.apache.org by "Stefano Bagnara (JIRA)" <ma...@james.apache.org> on 2011/01/20 23:56:43 UTC
[jira] Commented: (MAILET-33) MailetContext should provide a log
method which allow to specify the loglevel
[ https://issues.apache.org/jira/browse/MAILET-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984452#action_12984452 ]
Stefano Bagnara commented on MAILET-33:
---------------------------------------
As a compromise between performance and code verbosity I often see java5 logging based on varargs:
log(Level level, String formatString, Object... params);
log(Level level, Throwable t, String formatString, Object... params);
The final message is created using String.format(formatString, params) so the implementation can delay the formatting after checking if the loglevel is enabled.
This also allow the simple call:
log(Level.DEBUG, "simple log with no arguments");
What do you think?
> MailetContext should provide a log method which allow to specify the loglevel
> -----------------------------------------------------------------------------
>
> Key: MAILET-33
> URL: https://issues.apache.org/jira/browse/MAILET-33
> Project: Mailet
> Issue Type: Improvement
> Components: Core API
> Affects Versions: 2.4
> Reporter: Norman Maurer
> Assignee: Norman Maurer
> Fix For: 2.5
>
>
> Currently MailetContext.log(..) does not allow to specify the loglevel to use for logging. We should mark this method as @deprecated and add a new one which takes a logging level argument.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.