Show TOC Start of Content Area

Background documentation Summary Highlights  Locate the document in its SAP Library structure

Syntax Use

The syntax rule described in the Javadoc API helps you to validate your syntax. Therefore, this section only explains what attributes/values can be paired/assigned with/to what objects, what is required and what is optional, and so on.

Note

The summary below highlights the semantics.

Recommendation

The list is not complete, therefore, it is recommended to refer to the Javadoc API for the complete semantics.

Summary of Configurable Attributes of Some Classes

Class

Possible Attribute

Reference to API

Multiple entries

Required

LogController

 

General for both Location, Category

 

 

 

severity

<logController>.setEffectiveSeverity(int)

 

 

 

effSeverity

(same as ‘severity’)

 

 

 

minSeverity

<logController>.setMinimumSeverity(int)

 

 

 

maxSeverity

<logController>.setMaximumSeverity(int)

 

 

 

logs

<logController>.addLog(Log)

X

 

 

localLogs

<logController>.addLocalLog(Log)

X

 

 

privateLogs

<logController>.addPrivateLog(Log)

X

 

 

filters

<logController>.addFilter(Filter)

X

 

 

bundleName

<logController>.setResourceBundleName(String)

 

 

Log

 

General for all Log subclasses

 

 

 

 

severity <log>.setEffectiveSeverity(int)

 

 

 

effSeverity

(same as ‘severity’)

 

 

 

encoding

<log>.setEncoding(String)

 

 

 

formatter

<log>.setFormatter(Formatter)

 

 

 

filters

<log>.addFilter(Filter)

X

 

FileLog

pattern

new FileLog(String)                 //Filename

X

 

 

 

limit      new FileLog(String, int, int)

 

 

 

cnt

(same as ‘limit’)

 

 

Formatter

pattern

<formatter>.setPattern(String)  //message format

 

 

 

      In case of a primitive data type, you can easily assign an integer or string as an attribute value (except Severity).

      In case of an attribute that takes a class, as listed above, such as Log or Formatter, you have to either use the classname directly or the notation of a variable.

More information: Syntax and Semantics of the Properties File.

      In case of a Filter interface, assign the fully qualified classname of the user-defined class. For that aim, make sure the class is already included in the classpath, and use an appropriate class loader. This also applies to user-defined classes for Log and Formatter: use a full classname if you are not using the standard classes provided by the SAP Logging API.

 

Attribute

Type

Possible Value

Comments

Severity, effSeverity, minSeverity, maxSeverity

Integer

NONE

Constants are defined in class Severity for your convenience.

Refers to Javadoc of class Severity.

 

 

FATAL

Case-sensitive

 

 

ERROR

Case-sensitive

 

 

WARNING

Case-sensitive

 

 

INFO

Case-sensitive

 

 

PATH

Case-sensitive

 

 

DEBUG

Case-sensitive

 

 

ALL

Case-sensitive

Logs    (classname)

Log

FileLog

Case-sensitive

 

 

ConsoleLog

 

Logs

(variable)

 

log[<id>]

<id> can be any logical, meaningful name.

Formatter   (classname)

Formatter

TraceFormatter

 

 

 

ListFormatter

 

 

 

XMLFormatter

 

Formatter    (variable)

 

formatter[<id>]

<id> can be any logical, meaningful name.

Filters         (classname)

Filter (interface)

com.sapmarkets.um.logging.Filter

Actual implementation defined by users. The arbitrary value shown on the left column indicates a class named ‘Filter’ is defined by user under the package ‘com.sapmarkets.um.logging’.

 

 

End of Content Area