Interface LogService
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy
$INSTANCE-ROOT/logs. The following log files
will be stored under the logs directory.
access.logkeeps default virtual server HTTP access messages.- server.log keeps log messages from default virtual server.
-
Method Summary
Modifier and TypeMethodDescriptionGets the value of thealarmsproperty.getFile()Gets the value of thefileproperty.Gets the value of thelogFilterproperty.Gets the value of thelogHandlerproperty.@Min(1L) StringGets the value of thelogRotationLimitInBytesproperty.@Min(0L) @Max(14400L) StringGets the value of thelogRotationTimelimitInMinutesproperty.Gets the value of thelogToConsoleproperty.Gets the value of themoduleLogLevelsproperty.@Min(5L) @Max(500L) StringGets the value of theretainErrorStatisticsForHoursproperty.Gets the value of theuseSystemLoggingproperty.voidSets the value of thealarmsproperty.voidSets the value of thefileproperty.voidsetLogFilter(String logFilter) Sets the value of thelogFilterproperty.voidsetLogHandler(String logHandler) Sets the value of thelogHandlerproperty.voidsetLogRotationLimitInBytes(String logRotationLimit) Sets the value of thelogRotationLimitInBytesproperty.voidsetLogRotationTimelimitInMinutes(String logRotationTimelimit) Sets the value of thelogRotationTimelimitInMinutesproperty.voidsetLogToConsole(String logToConsole) Sets the value of thelogToConsoleproperty.voidsetModuleLogLevels(ModuleLogLevels moduleLogLevels) Sets the value of themoduleLogLevelsproperty.voidsetRetainErrorStatisticsForHours(String retainErrorStatistics) Sets the value of theretainErrorStatisticsForHoursproperty.voidsetUseSystemLogging(String useSystemLogging) Sets the value of theuseSystemLoggingproperty.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParent
-
Method Details
-
getFile
String getFile()Gets the value of thefileproperty.Can be used to rename or relocate server.log using absolute path.
- Returns:
- possible object is
String
-
setFile
Sets the value of thefileproperty.- Parameters:
file- allowed object isString- Throws:
PropertyVetoException
-
getUseSystemLogging
String getUseSystemLogging()Gets the value of theuseSystemLoggingproperty.If
true, will utilize Unix syslog service or Windows Event Logging to produce and manage logs.- Returns:
- possible object is
String
-
setUseSystemLogging
Sets the value of theuseSystemLoggingproperty.- Parameters:
useSystemLogging- allowed object isString- Throws:
PropertyVetoException
-
getLogHandler
String getLogHandler()Gets the value of thelogHandlerproperty.Can plug in a custom log handler to add it to the chain of handlers to log into a different log destination than the default ones given by the system (which are Console, File and Syslog). It is a requirement that customers use the log formatter provided by the system to maintain uniformity in log messages. The custom log handler will be added at the end of the handler chain after File + Syslog Handler, Console Handler and JMX Handler. User cannot replace the handler provided by the system, because of loosing precious log statements. The Server Initialization will take care of installing the custom handler with the system formatter initialized. The user need to use JSR 047 Log Handler Interface to implement the custom handler.
- Returns:
- possible object is
String
-
setLogHandler
Sets the value of thelogHandlerproperty.- Parameters:
logHandler- allowed object isString- Throws:
PropertyVetoException
-
getLogFilter
String getLogFilter()Gets the value of thelogFilterproperty.Can plug in a log filter to do custom filtering of log records. By default, there is no log filter other than the log level filtering provided by JSR 047 log API.
- Returns:
- possible object is
String
-
setLogFilter
Sets the value of thelogFilterproperty.- Parameters:
logFilter- allowed object isString- Throws:
PropertyVetoException
-
getLogToConsole
String getLogToConsole()Gets the value of thelogToConsoleproperty.Logs will be sent to stderr when
asadmin start-domain verboseis used.- Returns:
- possible object is
String
-
setLogToConsole
Sets the value of thelogToConsoleproperty.- Parameters:
logToConsole- allowed object isString- Throws:
PropertyVetoException
-
getLogRotationLimitInBytes
Gets the value of thelogRotationLimitInBytesproperty.Log Files will be rotated when the file size reaches the limit.
- Returns:
- possible object is
String
-
setLogRotationLimitInBytes
Sets the value of thelogRotationLimitInBytesproperty.- Parameters:
logRotationLimit- allowed object isString- Throws:
PropertyVetoException
-
getLogRotationTimelimitInMinutes
Gets the value of thelogRotationTimelimitInMinutesproperty.This is a new attribute to enable time based log rotation. The Log File will be rotated only if this value is non-zero and the valid range is
60minutes (1 hour) to 10*24*60 minutes (10 days). If the value is zero then the files will be rotated based on size specified in log-rotation-limit-in-bytes.- Returns:
- possible object is
String
-
setLogRotationTimelimitInMinutes
Sets the value of thelogRotationTimelimitInMinutesproperty.- Parameters:
logRotationTimelimit- allowed object isString- Throws:
PropertyVetoException
-
getAlarms
String getAlarms()Gets the value of thealarmsproperty.If
true, will turn on alarms for the logger. TheSEVEREandWARNINGmessages can be routed through the JMX framework to raiseSEVEREandWARNINGalerts. Alarms are turned off by default.- Returns:
- possible object is
String
-
setAlarms
Sets the value of thealarmsproperty.- Parameters:
alarms- allowed object isString- Throws:
PropertyVetoException
-
getRetainErrorStatisticsForHours
Gets the value of theretainErrorStatisticsForHoursproperty.The number of hours since server start, for which error statistics should be retained in memory. The default and minimum value is
5hours. The maximum value allowed is500hours. Note that larger values will incur additional memory overhead.- Returns:
- possible object is
String
-
setRetainErrorStatisticsForHours
Sets the value of theretainErrorStatisticsForHoursproperty.- Parameters:
retainErrorStatistics- allowed object isString- Throws:
PropertyVetoException
-
getModuleLogLevels
ModuleLogLevels getModuleLogLevels()Gets the value of themoduleLogLevelsproperty.- Returns:
- possible object is
ModuleLogLevels
-
setModuleLogLevels
Sets the value of themoduleLogLevelsproperty.- Parameters:
moduleLogLevels- allowed object isModuleLogLevels- Throws:
PropertyVetoException
-