You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <ji...@apache.org> on 2015/06/15 22:31:00 UTC
[jira] [Comment Edited] (QPID-6591) [Java Broker] Add ability to
generate a virtualhost specific log
[ https://issues.apache.org/jira/browse/QPID-6591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14586636#comment-14586636 ]
Rob Godfrey edited comment on QPID-6591 at 6/15/15 8:30 PM:
------------------------------------------------------------
AbstractLogger defines
{code}
protected abstract Appender<ILoggingEvent> asAppender(Context context);
{code}
however all the implementations appear to be public, e.g.
{code}
@Override
public Appender<ILoggingEvent> asAppender(Context context)
{code}
in BrokerConsoleLoggerImpl.java. Moreover asAppender isn't really a great name for this as we are actually creating the Appender rather than presenting the Logger as an Appender by means of a facade or something. I'd suggest correcting the visibility of the implementations and changing the name to createAppenderInstance or something.
----
Also why is this defined as public - it only seems to be used within AbstractLogger istself:
{code}
public void stopLogging()
{
Appender appender = ROOT_LOGGER.getAppender(getName());
if (appender != null)
{
appender.stop();
ROOT_LOGGER.detachAppender(appender);
}
}
{code}
was (Author: rgodfrey):
AbstractLogger defines
{code}
protected abstract Appender<ILoggingEvent> asAppender(Context context);
{code}
however all the implementations appear to be public, e.g.
{code}
@Override
public Appender<ILoggingEvent> asAppender(Context context)
{code}
in BrokerConsoleLoggerImpl.java. Moreover asAppender isn't really a great name for this as we are actually creating the Appender rather than presenting the Logger as an Appender by means of a facade or something. I'd suggest correcting the visibility of the implementations and changing the name to createAppenderInstance or something.
> [Java Broker] Add ability to generate a virtualhost specific log
> ----------------------------------------------------------------
>
> Key: QPID-6591
> URL: https://issues.apache.org/jira/browse/QPID-6591
> Project: Qpid
> Issue Type: New Feature
> Components: Java Broker
> Reporter: Alex Rudyy
> Assignee: Alex Rudyy
> Fix For: 6.0 [Java]
>
>
> We need the ability to write a separate log file for a virtualhost which contains just the log events for related to the virtualhost.
> * Add a VirtualHostLogger model object (like BrokerLogger) which will be a child of Virtualhost. (As such it will be automatically propagated around a HA group)
> * Add a VirtualHostFileLogger impl (like BrokerFileLogger impl)
> * Add a VirtualHostNameAndLevelFilter (like BrokerNameAndLevelFilter except that it additionally filters for events whose subject has a ConnectionPrincipal with a matching virtualhost).
> * Like the Broker counterparts, these Objects must be addable/removable/configurable dynamically.
> * ACL rule UPDATE VIRTUALHOST should be applied to these operations.
> * Include adding support for virtualhostloggers and virtualhostfilters to the REST API
> * As VH can be stopped and started (or a HA node become active), the implementation must be prepared to dynammically add and remove itself at run time.
> * Make sure housekeeping/queue running threads have appropriate Subject. (Maybe add concept of a VirtualhostPrinicpal).
> Owing to limitations in the model framework code VirtualHostLogger and BrokerLogger must be distinct, but there is nothing stopping their implementations from sharing a implementation from a non-model object.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org