Oracle Communications Services Gatekeeper OAM Java API Reference
7.0.0.1

E96580-01

com.bea.wlcp.wlng.log.management
Interface TraceServiceMBean


public interface TraceServiceMBean


Field Summary
static boolean aspectTracingEnabled
          Aspect Tracing enabled, disable to improve log4j performance.
static boolean tracingEnabled
          Specifies whether trace should be enabled or not.
 
Method Summary
abstract  void addContextCategory(java.lang.String identifier, java.lang.String category)
          Adds a category to an existing context trace file.
abstract  void addContextFilter(java.lang.String identifier, java.lang.String type, java.lang.String value)
          Adds one of the predefined filter types to the appender with the identified name.
abstract  void attachAppender(java.lang.String loggerName, java.lang.String appenderName)
          Allows adding a named appender to named loggers.
abstract  void attachAppenderInternal(org.apache.logging.log4j.Logger logger, java.lang.String svcName)
          Internal operation that creates a FileAppender that outputs to a file with the same name as the service.
abstract  void attachRemoteAppender(java.lang.String loggerName, java.lang.String host, java.lang.Integer port)
          Attach remote appender.
abstract  void createContextTraceFile(java.lang.String identifier, java.lang.String category, java.lang.String threshold)
          Creates a context trace file under root trace directory.
abstract  void createRootContextTraceFile(java.lang.String identifier)
          Creates a new root context trace file.
abstract  void createTraceDir()
          Internal method used to create the trace directory.
abstract  void flushBuffers()
          Flushes log buffers.
abstract  boolean getAspectTracingEnabled()
           
abstract  boolean getTracingEnabled()
           
abstract  void initialize()
          Internal method to create any schema required and initialize persisted or default values.
abstract  void removeAppender(java.lang.String loggerName)
          Remove and stop appender.
abstract  void removeContextTraceFile(java.lang.String identifier)
          Removes a context trace file.
abstract  void resetContextFilters(java.lang.String identifier)
          Removes all filters associated with a context trace file.
abstract  void rollOver()
          Rotates log files.
abstract  void setAspectTracingEnabled(boolean flag)
          Scope: Cluster
abstract  void setTracingEnabled(boolean flag)
          Scope: Cluster
 

Field Detail

aspectTracingEnabled

public static final boolean aspectTracingEnabled
Aspect Tracing enabled, disable to improve log4j performance.

Scope: Cluster

See Also:
Constant Field Values

tracingEnabled

public static final boolean tracingEnabled
Specifies whether trace should be enabled or not. True to enable, false to disable.

Scope: Cluster

See Also:
Constant Field Values
Method Detail

addContextCategory

public void addContextCategory(java.lang.String identifier,
                               java.lang.String category)
                        throws com.bea.wlcp.wlng.log.management.ManagementException
Adds a category to an existing context trace file.

Scope: Cluster

Parameters:
identifier - Identifier of the context trace file.
category - The Log4J category. The category is the package name, including subpackages, to trace on. For example, to trace on the SMPP plug-in, enter com.bea.wlcp.wlng.plugin.sms.smpp.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

addContextFilter

public void addContextFilter(java.lang.String identifier,
                             java.lang.String type,
                             java.lang.String value)
                      throws com.bea.wlcp.wlng.log.management.ManagementException
Adds one of the predefined filter types to the appender with the identified name. The filter is a name/value pair, where the type identifies the filter type to use, and the value is the value of the filter. All trace information that matches the filter is written to the context trace file. When the Trace service receives information about a request, it checks if the request matches the context filter. If it matches, the trace information is written to file. All filters must match for the trace to be written.

Examples:
To add a filter that matches all requests from service provider ID SP1, set the type to SERVICE_PROVIDER and the value to SP1. To add a filter that matches all requests from application ID APP1, set the type to APPLICATION and the value to APP1.

Scope: Cluster

Parameters:
identifier - Identifier of the context trace file.
type - One of the defined types: SERVICE_PROVIDER, APPLICATION, APPLICATION_INSTANCE, SESSION, TRANSACTION.
value - Value to filter on for this filter type.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

attachAppender

public void attachAppender(java.lang.String loggerName,
                           java.lang.String appenderName)
Allows adding a named appender to named loggers. Each Services Gatekeeper internal service has a default FileAppender that outputs to a file with the same name as the Services Gatekeeper internal service.

Scope: Cluster

Parameters:
loggerName - Logger name.
appenderName - Name of Services Gatekeeper internal service to attach the appender to.

attachAppenderInternal

public void attachAppenderInternal(org.apache.logging.log4j.Logger logger,
                                   java.lang.String svcName)
Internal operation that creates a FileAppender that outputs to a file with the same name as the service.

Scope: Cluster

Parameters:
logger - Logger.
svcName - Service name.

attachRemoteAppender

public void attachRemoteAppender(java.lang.String loggerName,
                                 java.lang.String host,
                                 java.lang.Integer port)
                          throws java.lang.Exception
Attach remote appender.

Scope: Cluster

Parameters:
loggerName - name of the remote appender. Should be unique.
host - the host name or ip address of the remote listener.
port - the port number.
Throws:
java.lang.Exception - when error.

createContextTraceFile

public void createContextTraceFile(java.lang.String identifier,
                                   java.lang.String category,
                                   java.lang.String threshold)
                            throws com.bea.wlcp.wlng.log.management.ManagementException
Creates a context trace file under root trace directory.

Scope: Cluster

Parameters:
identifier - Identifier to be used to add filters and will also result in a file named \"identifier.log\". Must be unique to the managed server.
category - Log4J category.
threshold - Log level threshold. Valid values are OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

createRootContextTraceFile

public void createRootContextTraceFile(java.lang.String identifier)
                                throws com.bea.wlcp.wlng.log.management.ManagementException
Creates a new root context trace file. Adds a context trace file under root trace directory and associates it with the root logger.

Scope: Cluster

Parameters:
identifier - Identifier to be used to add filters and will also result in a file named \"identifier.log\". Must be unique per managed server.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

createTraceDir

public void createTraceDir()
Internal method used to create the trace directory.

Scope: Cluster


flushBuffers

public void flushBuffers()
Flushes log buffers. This method only has an effect on FileAppenders or subclasses.

Scope: Cluster


getAspectTracingEnabled

public boolean getAspectTracingEnabled()

getTracingEnabled

public boolean getTracingEnabled()

initialize

public void initialize()
                throws com.bea.wlcp.wlng.log.management.ManagementException
Internal method to create any schema required and initialize persisted or default values.

Scope: Cluster

Throws:
com.bea.wlcp.wlng.log.management.ManagementException

removeAppender

public void removeAppender(java.lang.String loggerName)
                    throws java.lang.Exception
Remove and stop appender.

Scope: Cluster

Parameters:
loggerName - name of the remote appender to remove.
Throws:
java.lang.Exception - when error or logger name not correct.

removeContextTraceFile

public void removeContextTraceFile(java.lang.String identifier)
                            throws com.bea.wlcp.wlng.log.management.ManagementException
Removes a context trace file.

Scope: Cluster

Parameters:
identifier - Identifier of the context trace file.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

resetContextFilters

public void resetContextFilters(java.lang.String identifier)
                         throws com.bea.wlcp.wlng.log.management.ManagementException
Removes all filters associated with a context trace file.

Scope: Cluster

Parameters:
identifier - Identifier of the context trace file.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

rollOver

public void rollOver()
Rotates log files. This invokes the rollOver() method on all registered RollingFileAppenders.

Scope: Cluster


setAspectTracingEnabled

public void setAspectTracingEnabled(boolean flag)
                             throws com.bea.wlcp.wlng.log.management.ManagementException

Scope: Cluster

Parameters:
flag - Flag to enable or disable aspect tracing.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

setTracingEnabled

public void setTracingEnabled(boolean flag)
                       throws com.bea.wlcp.wlng.log.management.ManagementException

Scope: Cluster

Parameters:
flag - Flag to enable or disable tracing.
Throws:
com.bea.wlcp.wlng.log.management.ManagementException

Oracle Communications Services Gatekeeper OAM Java API Reference
7.0.0.1

E96580-01

Copyright © 2008, 2018, Oracle and/or its affiliates. All rights reserved.