|
Search XAP 7.0
Offline Documentation
Download latest offline documentation in HTML format:
|
Summary: GigaSpaces logging facilities
OverviewGigaSpaces makes logging calls by use of the Java TM platform's core logging facilities. Configuration FileThe logging configuration is initialized using a logging configuration file that is read at startup. This logging configuration file is in the standard java.util.Properties format. It configures custom versions of both java.util.logging.Handler and java.util.logging.Formatter, and default levels for frequently used loggers (categories). The default configuration file is located under: <GigaSpaces>/config/gs_logging.properties Overriding the Default ConfigurationThe configuration defined in the gs_logging.properties file may be overridden by either using system properties or by providing an external configuration file with overrides. This external configuration file should be located in the classpath under: /config/gs_ext_logging.properties Any configuration that you wish to override in gs_logging.properties file, should appear in gs_ext_logging.properties with its new value. The same applies for system properties, e.g. -Dcom.gigaspaces.exceptions.level=WARNING
Overriding the Configuration FileYour own configuration file may also be used instead of the platform's default. This is done by setting the configuration file location using a system property: -Djava.util.logging.config.file=myfile.properties GigaSpaces scripts rely on the exported environment variable GS_LOGGING_CONFIG_FILE (declared in <GigaSpaces>/bin/setenv script). The preferred way to apply your override file is to use a wrapper script: export the new setting of this variable and call the original script. This ensures that when setenv.sh(bat) is called from within the platform's scripts, it will pick up the override. # unix export GS_LOGGING_CONFIG_FILE=myfile.properties ./gsc.sh Provided that your application initializes the logging facility via the Logging API (e.g. LogManager.readConfiguration(InputStream ins)), you may wish to disable the GigaSpaces configuration altogether. Once disabled, your Java logging settings will take place. This is done with the following system property: -Dcom.gs.logging.disabled=true
TroubleshootingTo troubleshoot and detect which logging properties file was loaded and from which location, use the following system property: -Dcom.gs.logging.debug=true
HandlersGigaSpaces configures logging with two log {{Handler}}s.
FormattersFormatters are in charge of formatting the log messages and adding meta data to them (date, time, level, etc). Exception visibilityGigaSpaces prints exception stack traces for messages with level SEVERE or higher. com.gigaspaces.exceptions.level = SEVERE Messages with lower levels with only be logged with the exception's toString() value. To force the logger to print the stack trace of exception with lower levels, such as Level WARNING for example, set the com.gigaspaces.exceptions.level property to WARNING. Note that if the exception is a java.lang.RuntimeException its stack trace will always be logged, regardless of the level definition. Logging Management at RuntimeIt is possible to change various logger level settings while the system is up and running without the need to restart it. You can do so by connecting to the JMX Bean of the Java logging facility via JConsole for example.
The LoggingMXBean enables you to:
.NET bridgeThe logging configuration file includes declarations of the loggers available at the bridge between .NET and Java. #DOTNET Bridge com.gigaspaces.externaldatasource.dotnet.level = INFO com.gigaspaces.bridge.dispatcher.level = INFO com.gigaspaces.bridge.pbsexecuter.level = INFO C++ BridgeThe logging configuration file includes declarations of the C++ Java Proxy logger, which logs info such as exceptions and JVM creation. #C++ com.gigaspaces.cpp.proxy.level = INFO FAQHow do I minimize cost when migrating to 7.0 ? Section Contents
|
GigaSpaces Logging
IMPORTANT: This is an old version of GigaSpaces XAP. Click here for the latest version.
(None)
