Alon Bar-Lev has posted comments on this change.

Change subject: core : Allow redirection of all logs to syslog using extension
......................................................................


Patch Set 3:

(6 comments)

http://gerrit.ovirt.org/#/c/27431/3/backend/manager/modules/extensions-api-root/extensions-api/src/main/java/org/ovirt/engine/api/extensions/logger/Logger.java
File 
backend/manager/modules/extensions-api-root/extensions-api/src/main/java/org/ovirt/engine/api/extensions/logger/Logger.java:

Line 8:      * Invoke keys.
Line 9:      */
Line 10:     public static class InvokeKeys {
Line 11:         /** Log Record. */
Line 12:         public static final ExtKey LOG_RECORD = new 
ExtKey("LOGGER_LOG_RECORD", Object.class, 
"fb624b25-793d-4d83-8c31-2b257ec84438");
why Object and not Record?
Line 13:     }
Line 14: 
Line 15:     /**
Line 16:      * Invoke commands.


http://gerrit.ovirt.org/#/c/27431/3/backend/manager/modules/logger/src/main/java/org/ovirt/engine/core/logger/LoggerHandler.java
File 
backend/manager/modules/logger/src/main/java/org/ovirt/engine/core/logger/LoggerHandler.java:

Line 14: public class LoggerHandler extends Handler {
Line 15: 
Line 16:     private static final String LOGGER_SERVICE = 
Logger.class.getName();
Line 17: 
Line 18:     public LoggerHandler() {}
why is required?
Line 19: 
Line 20:     @Override
Line 21:     public void publish(LogRecord record) {
Line 22:         for (ExtensionProxy extension : getExtensions()) {


Line 35:         for (ExtensionProxy extension : getExtensions()) {
Line 36:             extension.invoke(new ExtMap()
Line 37:                 .mput(Base.InvokeKeys.COMMAND, 
Base.InvokeCommands.TERMINATE));
Line 38:         }
Line 39:     }
you do not need to send TERMINATE as this is what extension manager will do, if 
we need that event, please add command in the logger interface.
Line 40: 
Line 41:     private List<ExtensionProxy> getExtensions() {
Line 42:         return 
ExtensionsManager.getInstance().getProvidedExtensions(LOGGER_SERVICE);
Line 43:     }


Line 38:         }
Line 39:     }
Line 40: 
Line 41:     private List<ExtensionProxy> getExtensions() {
Line 42:         return 
ExtensionsManager.getInstance().getProvidedExtensions(LOGGER_SERVICE);
cache this?
Line 43:     }
Line 44: 


http://gerrit.ovirt.org/#/c/27431/3/packaging/services/ovirt-engine/ovirt-engine.xml.in
File packaging/services/ovirt-engine/ovirt-engine.xml.in:

Line 60:   <profile>
Line 61: 
Line 62:     <subsystem xmlns="urn:jboss:domain:logging:1.1">
Line 63: 
Line 64:       <custom-handler name="SYSLOG" 
class="org.ovirt.engine.core.logger.LoggerHandler" 
module="org.ovirt.engine.core.logger">
not SYSLOG... call it based on the classname? module name? anything with ovirt.
Line 65:         <level name="INFO"/>
Line 66:       </custom-handler>
Line 67: 
Line 68:       <!-- All the application server messages go here: -->


Line 61: 
Line 62:     <subsystem xmlns="urn:jboss:domain:logging:1.1">
Line 63: 
Line 64:       <custom-handler name="SYSLOG" 
class="org.ovirt.engine.core.logger.LoggerHandler" 
module="org.ovirt.engine.core.logger">
Line 65:         <level name="INFO"/>
make it debug? so accept anything that is debug?
Line 66:       </custom-handler>
Line 67: 
Line 68:       <!-- All the application server messages go here: -->
Line 69:       <file-handler name="SERVER">


-- 
To view, visit http://gerrit.ovirt.org/27431
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0dae8ffe53c3489af06d6684c72e6b431002404
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to