public class NoLogManager extends Object implements ILogManager
Use this log manager if you do not want JEF to manage logs. Only the settings defined through usual Log4j customization will take effect.
Side effect: Disabling log management means JEF will no longer produce its own log files and automated log backups. It also means it has no way to report on logs through its API. This may affect integration with other tools such as JEF Monitor.
A typical use case for disabling JEF log management is to use console logging only, or have your own file rotation stategy.
<logManager class="com.norconex.jef4.log.NoLogManager"/>
Constructor and Description |
---|
NoLogManager() |
Modifier and Type | Method and Description |
---|---|
void |
backup(String namespace,
Date backupDate)
Backups the log for the given name space, and time stamps it with
the given date.
|
Appender |
createAppender(String namespace)
Creates a Log4J appender for the given name space.
|
boolean |
equals(Object other) |
InputStream |
getLog(String namespace)
Gets the log for the given namespace.
|
InputStream |
getLog(String namespace,
String jobId)
Gets the log for the given namespace and job identifier.
|
int |
hashCode() |
void |
loadFromXML(Reader in) |
void |
saveToXML(Writer out) |
String |
toString() |
public void loadFromXML(Reader in) throws IOException
loadFromXML
in interface com.norconex.commons.lang.config.IXMLConfigurable
IOException
public void saveToXML(Writer out) throws IOException
saveToXML
in interface com.norconex.commons.lang.config.IXMLConfigurable
IOException
public Appender createAppender(String namespace) throws IOException
ILogManager
createAppender
in interface ILogManager
namespace
- namespace of the executing contextIOException
- problem creating the appenderpublic InputStream getLog(String namespace) throws IOException
ILogManager
getLog
in interface ILogManager
namespace
- namespace of the executing contextIOException
- problem getting logpublic InputStream getLog(String namespace, String jobId) throws IOException
ILogManager
getLog
in interface ILogManager
namespace
- namespace of the executing contextjobId
- job identifierIOException
- problem getting logpublic void backup(String namespace, Date backupDate) throws IOException
ILogManager
getLog(String)
method.backup
in interface ILogManager
namespace
- namespace of the executing contextbackupDate
- date of this backupIOException
- problem creating backupCopyright © 2007–2021 Norconex Inc.. All rights reserved.