public class XLogService extends java.lang.Object implements Service, Instrumentable
oozie-log4j.properties.
The file name can be changed by setting the Java System property oozie.log4j.file.
The Log4j configuration files must be a properties file.
The Log4j configuration file is first looked in the Oozie configuration directory see ConfigurationService.
If the file is not found there, it is looked in the classpath.
If the Log4j configuration file is loaded from Oozie configuration directory, automatic reloading is enabled.
If the Log4j configuration file is loaded from the classpath, automatic reloading is disabled.
the automatic reloading interval is defined by the Java System property oozie.log4j.reload. The default
value is 10 seconds.
Unlike most of the other Services, XLogService isn't easily overridable because Services depends on XLogService being available
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_LOG4J_PROPERTIES
Default value for the log4j configuration file if
LOG4J_FILE is not set. |
static java.lang.String |
DEFAULT_RELOAD_INTERVAL
Default value for the reload interval if
LOG4J_RELOAD is not set. |
static java.lang.String |
GROUP
Group log info constant.
|
static java.lang.String |
LOG4J_FILE
System property that indicates the log4j configuration file to load.
|
static java.lang.String |
LOG4J_RELOAD
System property that indicates the reload interval of the configuration file.
|
static java.lang.String |
OOZIE_LOG_DIR
System property that indicates the logs directory.
|
static java.lang.String |
USER
Group log info constant.
|
CONF_PREFIX, DEFAULT_LOCK_TIMEOUT, lockTimeout| Constructor and Description |
|---|
XLogService() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the log service.
|
java.lang.Class<? extends Service> |
getInterface()
Return the public interface for log service.
|
java.lang.String |
getOozieLogName() |
java.lang.String |
getOozieLogPath() |
void |
init(Services services)
Initialize the log service.
|
void |
instrument(Instrumentation instr)
Instruments the log service.
|
public static final java.lang.String OOZIE_LOG_DIR
public static final java.lang.String LOG4J_FILE
public static final java.lang.String LOG4J_RELOAD
public static final java.lang.String DEFAULT_LOG4J_PROPERTIES
LOG4J_FILE is not set.public static final java.lang.String DEFAULT_RELOAD_INTERVAL
LOG4J_RELOAD is not set.public static final java.lang.String USER
public static final java.lang.String GROUP
public XLogService()
public java.lang.String getOozieLogPath()
public java.lang.String getOozieLogName()
public void init(Services services) throws ServiceException
init in interface Serviceservices - services instance.ServiceException - thrown if the log service could not be initialized.public java.lang.Class<? extends Service> getInterface()
getInterface in interface ServiceXLogService.public void instrument(Instrumentation instr)
instrument in interface Instrumentableinstr - instrumentation to use.Copyright © 2019 Apache Software Foundation. All Rights Reserved.