The Logging
Service enables applications to do the following:
-
send
run-time messages to one or more output destinations, including consoles,
files, and socket connections.
-
configure and
control the format of information that is sent to a particular destination.
Configuration can be performed through static configuration files
or by invoking run-time methods that control logging output.
-
perform
remote logging, which involves sending log messages that are generated
in one Java virtual machine (JVM) to another JVM.
-
perform logging either by user
session or by JVM.
For more information
about the Logging Service, see
com.sas.services.logging
in the SAS Foundation Services class documentation at
http://support.sas.com/rnd/javadoc/93
.
When a service deployment
is defined and deployed, a base logging configuration is used to determine
the appropriate output destinations. However, you can use SAS Management
Console Foundation Services Manager to modify the Logging Service
configuration and configure additional logging contexts and output
destinations. The Logging Service configuration consists of the following
items:
specify the name and
outputs for a specific logging context. In your application, you code
the Logging Service to send information to a specific logging context.
(The RootLoggingContext is used for any logging context that is not
configured.) When naming the logging context, you can specify the
logging context name as part of a naming hierarchy. In a naming hierarchy,
the logging context names are separated by a period (for example, com.sas.services.event
). If a call to a logging context
named com.sas.services.event
is made
and there is no logging context for com.sas.services.event
, then the Logging Service looks for a logging context of com.sas.services
. If there is no logging context
for com.sas.services
, then com.sas
is used. When you define a logging context,
you associate outputs with the logging context in order to specify
where to send logging messages for that particular logging context.
Note: To associate outputs with
a logging context, you must first create the output definition.
specify an output destination
for the logging messages. The Logging Service can send the log messages
to a file, console, or socket.
specify a custom renderer
that is used to format logging messages for a specific class. The
custom renderer enables you to format logging output when you specify
an object as the message parameter in a logging call.