Web Client 8.0.3

RemoteAppender

RemoteAppender

RemoteAppender extends SimpleLogAppender and implements the publishing of log messages by sending them back to Lightstreamer Server. The Server will log the messages through its "LightstreamerLogger.webclient" logger at DEBUG level.
Note that the delivery of some log messages to the Server may fail.

Constructor

new RemoteAppender(level, category, lsClient)

Constructor for RemoteAppender.

Parameters:
Name Type Description
level String

The threshold level at which the RemoteAppender is created. It should be one of "WARN", "ERROR" and "FATAL". The use for "DEBUG" and "INFO" levels is not supported on this appender.

category String

The category this appender should listen to. See SimpleLogAppender#setCategoryFilter.

lsClient LightstreamerClient

An instance of LightstreamerClient object used to send log messages back to the server.

Throws:

if the LightstreamerClient parameter is missing

Type
IllegalArgumentException

Extends

Methods

(protected) composeLine(category, level, mex, header) → {String}

Utility method that can be used by subclasses to join various info in a single line. The message will be composed this way: category + " | " + level + " | " + header + " | " + mex

Parameters:
Name Type Description
category String

the message category

level String

the message level

mex String

the message itself

header String

a custom header

Inherited From:
Returns:
Type
String

extractLog()

Disabled

getCategoryFilter() → {String}

Inquiry method that returns the category for this SimpleLogAppender instance. A SimpleLogAppender only receives log lines from the Logger associated to the returned category, unless "*" is returned, in which case it receives log from all loggers.

Inherited From:
Returns:

The category of this SimpleLogAppender instance, or "*".

Type
String

getLevel() → {String}

Inquiry method that returns the current threshold level of this SimpleLogAppender instance.

Inherited From:
Returns:

the level of this SimpleLogAppender instance. It will be one of "DEBUG", "INFO", "WARN", "ERROR" and "FATAL".

Type
String

log(category, level, mex)

Publish a log message by sending it to Lightstreamer server by LightstreamerClient object. Specific layout: 'LS_log1=HH:mm:ss.ccc - category : message'.

Parameters:
Name Type Description
category

The logger category that produced the given message.

level

The logging level of the given message. It should be one of DEBUG INFO WARN ERROR FATAL constants values.

mex

The message to be logged. It could be a String instance, an Error instance or any other object, provided that it has a toString method.

Overrides:

setCategoryFilter(categoryopt)

Setter method that changes the current category of this SimpleLogAppender instance.
This SimpleLogAppender will only receive log lines from the Logger associated to the specified category, unless "*" is specified, in which case it will receive log from all loggers.
the filter can be changed at any time and will affect subsequent log lines.

Parameters:
Name Type Attributes Description
category String <optional>

the new category for this SimpleLogAppender, or "". If not specified "" is assumed

Inherited From:

setLevel(levelopt)

Setter method that changes the current threshold level of this SimpleLogAppender instance. The filter can be changed at any time and will affect subsequent log lines

Parameters:
Name Type Attributes Description
level String <optional>

The new level for this SimpleLogAppender instance. It should be one of "DEBUG", "INFO", "WARN", "ERROR" and "FATAL". If not or wrongly specified INFO will be used.

Inherited From:

setLoggerProvider(loggerProvider)

Called by SimpleLoggerProvider to notify itself to a newly added appender.

Parameters:
Name Type Description
loggerProvider SimpleLoggerProvider

the SimpleLoggerProvider instance handling this appender.

Inherited From: