Module org.glassfish.main.jul
Package org.glassfish.main.jul.cfg
Class GlassFishLogManagerConfiguration
java.lang.Object
org.glassfish.main.jul.cfg.GlassFishLogManagerConfiguration
- All Implemented Interfaces:
Serializable,Cloneable
Replacement (wrapper) for
Properties used in JUL.- Author:
- David Matejcek
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration entry, pair of a key and a value, both can be null (but it is not very useful). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates clone of this instance.getProperty(String name) booleanIfGlassFishLoggingConstants.KEY_CLASS_AND_METHOD_DETECTION_ENABLEDis set to true, GJULE will detect the caller class and method from stacktrace, which is quite expensive operation affecting logging throughput.booleanParses the configuration from aFile.parse(InputStream inputStream) Parses the configuration from anInputStream.toStream()toString()Returns this configuration formatted as aProperties
-
Constructor Details
-
GlassFishLogManagerConfiguration
- Parameters:
properties- configuration to clone
-
-
Method Details
-
getPropertyNames
- Returns:
- all property names used in the current configuration.
-
getProperty
- Parameters:
name- proeprty name- Returns:
- null or configured value
-
toStream
- Returns:
Streamof configuration entries (key and value)
-
toProperties
- Returns:
- cloned
Properties
-
isTracingEnabled
public boolean isTracingEnabled()- Returns:
- true if the logging of logging is enabled in this configuration. Doesn't affect error reporting, which is always enabled.
-
isClassAndMethodDetectionEnabled
public boolean isClassAndMethodDetectionEnabled()IfGlassFishLoggingConstants.KEY_CLASS_AND_METHOD_DETECTION_ENABLEDis set to true, GJULE will detect the caller class and method from stacktrace, which is quite expensive operation affecting logging throughput.If it is set to false, GJULE will not perform such detection.
If the property is not set, GJULE makes the decision based on the(
*.printSourceproperty) - if any formatter requires this feature, the feature is enabled.It is disabled otherwise.
- Returns:
- true if formatters can use autodetected source class and method in formatters.
-
clone
Creates clone of this instance. -
toString
Returns this configuration formatted as aProperties -
parse
Parses the configuration from aFile.- Parameters:
file-- Returns:
GlassFishLogManagerConfiguration- Throws:
IOException
-
parse
Parses the configuration from anInputStream.- Parameters:
inputStream-- Returns:
GlassFishLogManagerConfiguration- Throws:
IOException
-