|
This section describes the default logging configuration file along with some details common to LinkServer logging configuration.
Here is the default config:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="threshold" value="debug"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %-25c %m - [%t] %C.%M (%F:%L)%n"/>
</layout>
</appender>
<appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
<param name="threshold" value="debug"/>
<param name="file" value="linkserver.log"/>
<param name="append" value="true"/>
<param name="DatePattern" value=".yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %-25c %m - [%t] %C.%M (%F:%L)%n"/>
</layout>
</appender>
<category name="org.apache">
<level value="error"/>
</category>
<logger name="ag" additivity="false">
<level value="warn"/>
<appender-ref ref="file"/>
<appender-ref ref="console"/>
</logger>
<logger name="ag.alerts">
<level value="info"/>
</logger>
<!-- Other logging categories are skipped -->
<root>
<priority value="warn"/>
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
</log4j:configuration>
The default logging configuration is represented by a root configuration element, two appenders (destinations for log output) and several named logging categories. The root element (<root>) defines the global logging level as warning (<priority value="warn"/>) (see logging levels for more information). It applies to all messages coming from the system libraries used by the server core.
Logging of the server itself is performed using info level. This is specified by the <level value="info"/> tag that is located in <logger name="ag.*">. To switch the server to debug-level logging in a certain category, change this tag to <level value="debug"/>. The <logger> elements define which level is used for logging from each subsystem of LinkServer.
This logging configuration also defines two appenders named CONSOLE and FILE. An Appender is a destination for logging output. It can be a text file, e-mail message etc (see below for a complete listing of all available appenders).
Each appender is configured by its own <appender> element. This element must also specify a name of Java class responsible for this appender. In the listing above both appenders include a <layout> elements, that defines how the logged information will be formatted. The FILE appender includes several other <param> elements containing some additional options. For more information, consult manuals or books mentioned in logging framework documentation sources chapter.
Logging Categories
This section describes logging categories that are relevant to LinkServer, AggreGate Client and other components of AggreGate.
Category Name
|
Description
|
ag.alerts
|
Messages related to Alerts.
|
ag.bindings
|
Messages related to Data Bindings. Most logging in this category is performed at Debug level.
|
ag.commands
|
Logging of command exchange between different components of the system. Most logging in this category is performed at Debug level.
|
ag.commands.device_server
|
Device Server commands are logged at Debug level in this category.
|
ag.commands.client
|
Client commands are logged at Debug level in this category.
|
ag.commands.agent
|
Agent commands are logged at Debug level in this category.
|
ag.commondata
|
Messages related to Common Data.
|
ag.clients
|
Messages related to AggreGate Clients.
|
ag.config
|
Messages related to Global Configuration of LinkServer.
|
ag.context
|
Generic messages related to Contexts. Most logging in this category is performed at Debug level.
|
ag.context.info
|
Info events in LinkServer context are logged at Info level in this category.
|
ag.context.children
|
Messages related to context tree structure management. Most logging in this category is performed at Debug level.
|
ag.context.variables
|
Messages related to context Variables (Properties). Most logging in this category is performed at Debug level.
|
ag.context.functions
|
Messages related to context Functions. Most logging in this category is performed at Debug level.
|
ag.context.events
|
Messages related to context Events. Most logging in this category is performed at Debug level.
|
ag.context.actions
|
Messages related to context Actions. Most logging in this category is performed at Debug level.
|
ag.core
|
This category is used for logging messages from core of LinkServer and AggreGate Client. Miscellaneous messages that can be hardly categorized are also related to this category.
|
ag.core.thread
|
Thread management messages.
|
ag.dao
|
Logging related to Data Access Objects engine, i.e. database interaction. Most logging in this category is performed at Debug level.
|
ag.device
|
Generic messages related to interaction between LinkServer and hardware devices.
|
ag.device.sync
|
Messages related to synchronization of LinkServer and hardware devices.
|
ag.device.agent
|
Messages related to Agent.
|
ag.device.http_proxy
|
Messages related to HTTP Proxy service.
|
ag.device.link_service
|
Messages related to Transparent Data Routing (Link Service).
|
ag.device.opc
|
Messages related to OLE for Process Control (OPC).
|
ag.device.snmp
|
Messages related to Simple Network Management Protocol (SNMP).
|
ag.device_browser
|
Messages related to Device Browser component of AggreGate Client.
|
ag.device_server
|
Messages related to Device Servers.
|
ag.device_server.inbands
|
Messages related to Device Servers inband command processing are logged at Debug level in this category
|
ag.data_table
|
Messages related to Data Tables. Most logging in this category is performed at Debug level.
|
ag.data_table.filter
|
Messages related to Data Tables filtering (used by Event Filters). Most logging in this category is performed at Debug level.
|
ag.data_table_editor
|
Messages related to Data Table Editor component of AggreGate Client.
|
ag.dns
|
Messages related to Domain Name System servers interaction. Specifically used by Dynamic DNS device driver.
|
ag.entity_selector
|
Messages related to Entity Selector component of AggreGate Client.
|
ag.eventfilters
|
Messages related to Event Filters.
|
ag.event_log
|
Messages related to Event Log component of AggreGate Client.
|
ag.expression_builder
|
Messages related to Expression Builder component of AggreGate Client.
|
ag.expressions
|
Messages related to Expression processing.
|
ag.favourites
|
Messages related to Favourites.
|
ag.groups
|
Messages related to Groups.
|
ag.gui
|
Generic messages related to Graphics User Interface (GUI).
|
ag.gui_builder
|
Messages related to GUI Builder (component of AggreGate Client).
|
ag.guide
|
Messages related to Interactive Guides.
|
ag.mail
|
Messages related to processing of outgoing and incoming E-mail messages and interaction with mail servers.
|
ag.net_admin
|
Messages related to Net Admin.
|
ag.plugins
|
Generic messages related to Plugins.
|
ag.properties_editor
|
Messages related to Properties Editor component of AggreGate Client.
|
ag.protocol
|
Messages related to AggreGate Communications Protocol. Most logging in this category is performed at Debug level.
|
ag.protocol.caching
|
Messages related to AggreGate Communications Protocol format caching. Most logging in this category is performed at Debug level.
|
ag.queries
|
Messages related to Queries.
|
ag.reports
|
Messages related to Reports.
|
ag.resource
|
Messages related to resources management. Most logging in this category is performed at Debug level.
|
ag.scheduler
|
Messages related to Scheduled Jobs.
|
ag.scripts
|
Messages related to Scripts and Widget Scripts.
|
ag.security
|
Messages related to security and permission checking. Most logging in this category is performed at Debug level.
|
ag.stdout
|
Standard output of different AggreGate libraries and components is redirected to this logging category. All logging in this category is performedat Debug level.
|
ag.stderr
|
Standard error output of different AggreGate libraries and components is redirected to this logging category. All logging in this category is performed at Info level.
|
ag.system_tree
|
Messages related to the System Tree component of AggreGate Client.
|
ag.trackers
|
Messages related to Trackers.
|
ag.users
|
Messages related to Users.
|
ag.web
|
Generic messages related to LinkServer Web Desktop.
|
ag.widgets
|
Messages related to Widgets.
|
More About Appenders (An Edited Excerpt From The Log4j Manual)
Log4j allows logging requests to print to multiple destinations. In log4j speak, an output destination is called an appender. Currently, appenders exist for the console, files, GUI components, remote socket servers, JMS, NT Event Loggers, and remote UNIX Syslog daemons. More than one appender can be attached to a logger.
Here is a brief list of available appenders:
Common Appenders
FileAppender, appends log events to a file.
RollingFileAppender, extends FileAppender to backup the log files when they reach a certain size.
DailyRollingFileAppender, extends FileAppender so that the underlying file is rolled over at a user-specified frequency.
ConsoleAppender, appends log events to System.out or System.err using a layout specified by the user. The default target is System.out.
Network Appenders
SocketAppender, sends LoggingEvent objects to a remote a log server, usually a SocketNode.
SocketHubAppender, sends LoggingEvent objects to a set of remote log servers, usually a SocketNodes .
JMSAppender, a simple appender that publishes events to a JMS Topic. The events are serialized and transmitted as JMS message type ObjectMessage.
NTEventLogAppender, appends to the NT event log system.
Third-party Appenders
JDBCAppender
SNMPTrapAppender
Special Appenders
AsyncAppender, lets users log events asynchronously. It uses a bounded buffer to store logging events.
ExternallyRolledFileAppender, listens on a socket on the port specified by the PORT_OPTION for a "RollOver" message. When such a message is received, the underlying log file is rolled over and an acknowledgment message is sent back to the process initiating the roll over.
JDBCAppender, provides for sending log events to a database.
SMTPAppender, sends an e-mail when a specific logging event occurs, typically on errors or fatal errors.
SyslogAppender, sends messages to a remote syslog daemon.
TelnetAppender is a log4j appender that specializes in writing to a read-only socket.
WriterAppender, appends log events to a Writer or an OutputStream depending on the user's choice.
|