java.lang.Object
org.glassfish.main.jul.GlassFishLogManagerInitializer
Deprecated.
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.
As an example, when you enable GC logging, it will be always faster than this class.
That is why is this class deprecated and we recommend to use the
GlassFishLoggingConstants.JVM_OPT_LOGGING_MANAGER and other related options
which guarantee that the log manager will be set.
- Author:
- David Matejcek
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDeprecated.Tries to set theGlassFishLogManageras the JVM'sLogManagerimplementation.static booleantryToSetAsDefault(Properties configuration) Deprecated.Tries to set theGlassFishLogManageras the JVM'sLogManagerimplementation.
-
Method Details
-
tryToSetAsDefault
public static boolean tryToSetAsDefault()Deprecated.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
Deprecated.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
-