LeftMenu/mywms64.gif

Main page

FAQ
HOWTO
Components

Page Index

myWMS News
Mailinglist
lexicon

Recent Changes
WikiEtiquette

Find pages
Unused pages
Undefined pages

Impressum

Set your name in
UserPreferences

Edit this page


Referenced by
...nobody




JSPWiki v2.2.33
i18n support


[RSS]

Log Providers


The logProviders as elements of the XML-Dokument:

Log-ProviderXML-Syntax
Ringbuffer<Ringbuffer name='Ringbuffer-Name' author='Ringbuffer-Author' capacity='1024'/>
Logfile<Logfile name='Logfile-Name' author='Logfile-Author' pattern='Logfile-Pattern'/>
ProviderList<providerList name='ProviderList-Name' author='ProviderList-Author'></providerList>
Filter<Filter name='Filter-Name' author='Filter-Author' LogLevel='4'><StringToGrep>grep this String</StringToGrep></Filter>
NamespaceFilter<NamespaceFilter name='NamespaceFilter-Name' author='NamespaceFilter-Author' collect='true' namespaces='de.mywms.log'></NamespaceFilter>
Email<Email name='Email-Name' author='Email-Author' adresses='Email-Address'/>

The DTD of the XML-Dokument:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE providerListRoot [
<!ELEMENT Email EMPTY>
<!ATTLIST Email author CDATA #REQUIRED name CDATA #REQUIRED adresses CDATA #REQUIRED>
<!ELEMENT Logfile EMPTY>
<!ATTLIST Logfile author CDATA #REQUIRED name CDATA #REQUIRED pattern CDATA #REQUIRED>
<!ELEMENT Filter (StringToGrep|providerList|Email|Logfile|Filter|NamespaceFilter|Ringbuffer)*>
<!ATTLIST Filter author CDATA #REQUIRED name CDATA #REQUIRED LogLevel CDATA #REQUIRED>
<!ELEMENT providerList (providerList|Email|Logfile|Filter|NamespaceFilter|Ringbuffer)*>
<!ATTLIST providerList author CDATA #REQUIRED name CDATA #REQUIRED>
<!ELEMENT NamespaceFilter (providerList|Email|Logfile|Filter|NamespaceFilter|Ringbuffer)*>
<!ATTLIST NamespaceFilter namespaces CDATA #REQUIRED author CDATA #REQUIRED name CDATA #REQUIRED collect CDATA #REQUIRED>
<!ELEMENT providerListRoot (providerList|Email|Logfile|Filter|NamespaceFilter|Ringbuffer)*>
<!ELEMENT Ringbuffer EMPTY>
<!ATTLIST Ringbuffer author CDATA #REQUIRED name CDATA #REQUIRED capacity CDATA #REQUIRED>
<!ELEMENT StringToGrep (#PCDATA)>
]>

Examples for Logging-Configuration:

  • First Level Configuration
This configuration is setting direct in the configuration file without use of the "ProviderTree" (see Log Properties).
default#de.mywms.log.LogSingleton.Namespaces=de.mywms.clearing;de.mywms.communication;de.mywms.config;de.mywms.datastore;de.mywms.log;de.mywms.optimization;de.mywms.statistic;de.mywms.ui;de.mywms.util
default#de.mywms.log.LogSingleton.NamespacesEnable=false
default#de.mywms.log.LogSingleton.LoglevelThreshold=1
default#de.mywms.log.LogSingleton.Logfile=true
default#de.mywms.log.LogSingleton.LogfileName=default
The Logfile "default" contains all LogObjects:
<fakiri@taylor>:2005/08/26 15:27:05.389 UTC [INFORMATION|de.mywms.log.Logfile@main] [Logfile()]: Logfile startet
<fakiri@taylor>:2005/08/26 15:27:05.429 UTC [INFORMATION|de.mywms.log.LogSingleton@main] [setTimeZone()]: time zone ID is: UTC
<fakiri@taylor>:2005/08/26 15:27:05.830 UTC [INFORMATION|LogConfigXML@main] [startDocument]: start of the parse XML-Doc: ConfigTree
<fakiri@taylor>:2005/08/26 15:27:06.200 UTC [INFORMATION|LogConfigXML@main] [endDocument]: end of the parse XML-Doc: ConfigTree
<fakiri@taylor>:2005/08/26 15:27:12.390 UTC [DEBUG|de.mywms.config.Persistor@ConfigPersistor] [run()]: the configuration was written
<fakiri@taylor>:2005/08/26 15:27:12.400 UTC [INFORMATION|de.mywms.communication.tcpip.TcpipServerChannel@main: TCPIP-ServerChannel at 49999] [run()]: serving at port: 49999
<fakiri@taylor>:2005/08/26 15:27:12.430 UTC [INFORMATION|de.mywms.communication.tcpip.TcpipServerChannel@main: TCPIP-ServerChannel at 49999] [run()]: accepting connections at port: 49999
  • Second Level Cofiguration (Namespacefilter)
This configuration is setting in "ProviderTree" as XML-Document. The NamespaceFilter filters all the LogObjects comming from the package "de.mywms.communication.tcpip". All other incomming LogObjects are forwarding to the Logfile "File2".
default#de.mywms.log.LogSingleton.ProviderTree=<providerListRoot><NamespaceFilter name='NSFilter_L2' author='taieb' collect='false' namespaces='de.mywms.communication'><Logfile name='File2' author='taieb' pattern='logfile2'/></NamespaceFilter></providerListRoot>

The content of the Logfile "File2" shows so:
<fakiri@taylor>:2005/08/26 15:27:06.160 UTC [INFORMATION|de.mywms.log.Logfile@main] [Logfile()]: Logfile startet
<fakiri@taylor>:2005/08/26 15:27:06.200 UTC [INFORMATION|LogConfigXML@main] [endDocument]: end of the parse XML-Doc: ConfigTree
<fakiri@taylor>:2005/08/26 15:27:12.390 UTC [DEBUG|de.mywms.config.Persistor@ConfigPersistor] [run()]: the configuration was written
  • Second Level Cofiguration (Filter without StringToGrep input)
This configuration is setting in "ProviderTree as XML-Document. The Filter filters logObjects under the level "2" (INFORMATION). All other incomming LogObjects are forwarding to the Logfile "File3".
default#de.mywms.log.LogSingleton.ProviderTree=<providerListRoot><Filter name='Filter-L2' author='taieb' LogLevel='2'><Logfile name='File3' author='taieb' pattern='logfile3'/></Filter></providerListRoot>
The content of the Logfile "File3" shows so:
<fakiri@taylor>:2005/08/26 16:07:49.765 UTC [INFORMATION|LogConfigXML@main] [endDocument]: end of the parse XML-Doc: ConfigTree
<fakiri@taylor>:2005/08/26 16:07:55.924 UTC [INFORMATION|de.mywms.communication.tcpip.TcpipServerChannel@main: TCPIP-ServerChannel at 49999] [run()]: serving at port: 49999
<fakiri@taylor>:2005/08/26 16:07:55.964 UTC [INFORMATION|de.mywms.communication.tcpip.TcpipServerChannel@main: TCPIP-ServerChannel at 49999] [run()]: accepting connections at port: 49999
  • Second Level Configuration (Filter with StringToGrep input)
The Filter filters all the logObjects contains the strings "ConfigTree" and "the configuration" and forward it to the Logfile "File4".
default#de.mywms.log.LogSingleton.ProviderTree=<providerListRoot><Filter name='Filter_L2' author='taieb' LogLevel='1'><StringToGrep>ConfigTree</StringToGrep><StringToGrep>the configuration</StringToGrep><Logfile name='File4' author='taieb' pattern='logfile3'/></Filter></providerListRoot>
The content of the Logfile "File4" shows so:
<fakiri@taylor>:2005/08/26 15:27:06.180 UTC [INFORMATION|de.mywms.log.Logfile@main] [Logfile()]: Logfile startet
<fakiri@taylor>:2005/08/26 15:27:06.200 UTC [INFORMATION|LogConfigXML@main] [endDocument]: end of the parse XML-Doc: ConfigTree
<fakiri@taylor>:2005/08/26 15:27:12.390 UTC [DEBUG|de.mywms.config.Persistor@ConfigPersistor] [run()]: the configuration was written



Go to top   Edit this page   More info...   Attach file...
This page last changed on 30-Aug-2005 14:30:33 CEST by enterprise.iml.fhg.de .