/** * @param objectName * @param loggingObjectType * @param parent */ public SimpleLoggingObject( String objectName, LoggingObjectType loggingObjectType, LoggingObjectInterface parent ) { this.objectName = objectName; this.objectType = loggingObjectType; this.parent = parent; if ( parent != null ) { this.logLevel = parent.getLogLevel(); this.containerObjectId = parent.getContainerObjectId(); } }
public LogChannel( Object subject, LoggingObjectInterface parentObject ) { if ( parentObject != null ) { this.logLevel = parentObject.getLogLevel(); this.containerObjectId = parentObject.getContainerObjectId(); } else { this.logLevel = DefaultLogLevel.getLogLevel(); this.containerObjectId = null; } logChannelId = LoggingRegistry.getInstance().registerLoggingSource( subject ); }
private void grabLoggingObjectInformation( LoggingObjectInterface loggingObject ) { objectType = loggingObject.getObjectType(); objectName = loggingObject.getObjectName(); repositoryDirectory = loggingObject.getRepositoryDirectory(); filename = loggingObject.getFilename(); objectId = loggingObject.getObjectId(); objectRevision = loggingObject.getObjectRevision(); objectCopy = loggingObject.getObjectCopy(); logLevel = loggingObject.getLogLevel(); containerObjectId = loggingObject.getContainerObjectId(); forcingSeparateLogging = loggingObject.isForcingSeparateLogging(); gatheringMetrics = loggingObject.isGatheringMetrics(); if ( loggingObject.getParent() != null ) { getParentLoggingObject( loggingObject.getParent() ); // inherit the containerObjectId from parent containerObjectId = loggingObject.getParent().getContainerObjectId(); } }