
com.marklogic.client.impl.AbstractLoggingManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.impl;
import java.io.PrintStream;
import com.marklogic.client.util.RequestLogger;
abstract class AbstractLoggingManager {
protected RequestLogger requestLogger;
AbstractLoggingManager() {
super();
}
public void startLogging(RequestLogger logger) {
requestLogger = logger;
}
public void stopLogging() {
if (requestLogger == null) return;
PrintStream out = requestLogger.getPrintStream();
if (out != null) out.flush();
requestLogger = null;
}
protected boolean isLoggerEnabled() {
if (requestLogger != null)
return requestLogger.isEnabled();
return false;
}
protected PrintStream getPrintLogger() {
if (requestLogger == null)
return null;
return requestLogger.getPrintStream();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy