java.lang.Object
org.glassfish.main.jul.GlassFishLogManagerInitializer
This class tries to set the
GlassFishLogManager as the default LogManager
implementation.
The result is not guaranteed, because the first access to any Logger instance
in the JVM starts the initialization.
Simply said - this must be the first thing application must execute.
- Author:
- David Matejcek
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTries to set theGlassFishLogManageras the JVM'sLogManagerimplementation.static booleantryToSetAsDefault(Properties configuration) Tries to set theGlassFishLogManageras the JVM'sLogManagerimplementation.
-
Method Details
-
tryToSetAsDefault
public static boolean tryToSetAsDefault()Tries to set theGlassFishLogManageras the JVM'sLogManagerimplementation. This must be done before any JUL component is used and remains set until JVM shutdown. TheGlassFishLogManagerwill try to find the configuration automatically, use defaults, or will throw an exception, which depends on JVM options.- Returns:
- true if the operation was successful
-
tryToSetAsDefault
Tries to set theGlassFishLogManageras the JVM'sLogManagerimplementation. This must be done before any JUL component is used and remains set until JVM shutdown.- Parameters:
configuration- - logging.properties file content, if null,GlassFishLogManagerwill try to resolve it, the solution depends on JVM options.- Returns:
- true if the operation was successful
-