7.3 Configuring Serviceability

The serviceability subsystem of the SpringSource dm Server is configured in the serviceability.config file found in the SERVER_HOME/config directory of the dm Server installation. Any relative paths in this file are relative to the root of the installation, SERVER_HOME.

Configuring tracing

You can configure tracing at either a global or trickle level. Each level, in turn, provides two configurable settings. For the global level, you can set the directory to which the trace logs are written and the level of tracing (debug, error, info, and so on) for classes and packages. For the trickle level, you can set the window size of trace information as well as the level of tracing. For example:

"trace": {
     "global" : {
         "directory": "serviceability/trace",
         "levels": {
             "*" : "warn"
             "com.foo.*" : "verbose",
             "com.foo.TheClass" : "debug",
             "com.bar.AnotherClass" : "verbose"
         }
     },
     "trickle": {
         "windowSize": 10000,
         "levels": {
             "*" : "debug",
             "org.apache.commons.digester.*" : "warn"
          }
     }
}

In this example, the global tracing component will write its output to the $SERVER_HOME/serviceability/trace directory. The trace component provides five different levels at which trace can be output. These are, in descending order of severity: error, warn, info, debug, and verbose. The configured levels govern what trace is outputted and what trace is filtered out. Trace levels can be configured for individual classes or for entire packages and package trees. In this example, every class has info level tracing enabled except for those in the com.foo package and its subpackages which have verbose level tracing enabled, com.foo.TheClass which has debug level tracing enabled, and com.bar.AnotherClass which has verbose level tracing enabled. When determining what level of trace is enabled for any given class, the tracing component will use the level of the most specific match, for example, com.foo.TheClass is a more specific match than com.foo.*. Any classes that are not matched by any of the configured levels will have trace disabled.

Configuring logging

The logging component provides a single configurable setting. For example:

"logs": {
    "directory": "serviceability/logs"
}

In this example the logging component will write its output to the $SERVER_HOME/serviceability/logs directory.

Configuring dump files

You configure dumps using two components: the dump component specifies the directory in which dm Server should write the dump files and the heapDump component specifies whether to enable or disable the dumping of heaps when a problem with dm Server occurs. For example:

"dump": {
    "directory": "serviceability/dump"
},
"heapDump": {
    "enabled": false
} 

In this example, the dump file component will write its output to the $SERVER_HOME/serviceability/dump directory. Additionally, heap dumps are disabled.