com.protomatter.syslog

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » protomatter » com.protomatter.syslog 
com.protomatter.syslog
Syslog is a system-wide logging facility. It's roughly based on the UNIX syslog facility, but has many nice features not found there. It provides a clean, uniform interface for sending log messages and a modular back-end for writing entries to files, databases, etc.

The main class that other programs interact with is the {@link com.protomatter.syslog.Syslog Syslog} class. Everything on the class is static, making it easy to interact with as a service. The {@link com.protomatter.syslog.Channel Channel} class is a simplified, "federated namespace" interface for sending messages.

Messages sent to Syslog are handled by objects implementing the Syslogger interface. Syslog provides the concept of levels (DEBUG, INFO, WARNING, ERROR and FATAL). Individual loggers can have their own log policies for deciding if they should pay attention to given log message. There is a useful default policy that allows loggers to only listen to certain channels or messages at certain levels, etc.

Syslog provides startup classes for both the BEA WebLogic Server Application Server, and for Protomatter's own PAS Application Server. This allows for easy configuration of the Syslog package when each application server starts.

Please refer to the Syslog Whitepaper the JavaDoc for the {@link com.protomatter.syslog.Syslog Syslog} class for more information on usage.

For information on configuring Syslog via an XML file, please refer to JavaDoc for the {@link com.protomatter.syslog.xml.SyslogXML SyslogXML} class.

Every error message can displayed in a different language. Simply add a new resource (named com/protomatter/syslog/Syslog) to your classpath for the new language. For instance, to add French error messages, you would copy the existing file com/protomatter/syslog/Syslog.properties and make a new file called com/protomatter/syslog/Syslog_fr.properties and place it in the CLASSPATH. Please see the JavaDoc for the java.util.ResourceBundle class for more information.

Java Source File NameTypeComment
AsciiStreamDatabaseLogStatementAdapter.javaClass A log adapter that uses the setAsciiStream() method to set details.
BasicLogger.javaClass A base class for Syslogger implementations. This class provides common functions for setting the date format for log entries and for formatting dates. The default policy used by this logger is the SimpleLogPolicy SimpleLogPolicy policy.
Channel.javaClass A utility class for writing log messages to channels. Example usage of this class is as follows:

     // get the channel object
     Channel myChannel = Channel.getChannel("MY CHANNEL");
     myChannel.info(this, "Hello there");
     // get the default chanel object
     Channel default = Channel.getDefaultChannel();
     default.info(this, "Hello there");
     // You can also write to multiple channels
     String channels[] = new String[] { "first-channel", "second-channel" };
     Channel lotsaChannels = Channel.getChannel(channels);
     lotsChannels.info(this, "Hello there");
     // And finally, you can delegate the list of channels to
     // an object that implements the SyslogChannelAware interface
     SyslogChannelAware channelAware = new MyChannelAwareObject();
     Channel delegatedChannel = Channel.getChannel(channelAware);
     delegatedChannel.info(this, "Hello there");
     

Basically, rather than using the infoToChannel(...) method and others on Syslog, you can simply get a handle to a channel and call methods on it.

CharacterStreamDatabaseLogStatementAdapter.javaClass A log adapter that uses the setCharacterStream() method to set details.
DatabaseLog.javaClass A logger that writes to a database.
DatabaseLogStatementAdapter.javaInterface An adapter for setting the message detail in the database log.
FalseLogPolicy.javaClass A log policy that always returns false.
FileLog.javaClass A logger that simply writes to a file.
HTMLSyslogTextFormatter.javaClass A log entry formatter that produces HTML.
JDK14PerChannelPolicy.javaClass A policy that can make decision on a per-channel basis. It maintains a default log mask and channel list itself, but also has a list of "policy groups" that each have a log mask and channel list of their own in addition to a list of channel names that their mask and channel list applies to.
JDK14PerClassPolicy.javaClass A policy that can make decision on a per-class basis. It maintains a default log mask and channel list itself, but also has a list of "policy groups" that each have a log mask and channel list of their own in addition to a list of class names that their mask and channel list applies to.
JMSConstants.javaInterface Constants for JMS-related Syslog functions.
JMSLog.javaClass A logger that writes messages to JMS. The JMS session used has no transaction attribute itself, so it will obey any JTS transaction context which is currently active.

The SyslogServer SyslogServer class can be used as a standalone JMS message receiver.

LengthRolloverLog.javaClass An implementation of an object that will log things using the Syslog facility, and roll it's log files after a certain number of bytes have been written to them.
LogPolicy.javaInterface The interface for the pluggable log policy system.
MailException.javaClass An exception dealing with SMTP mail.
MailLog.javaClass A logger that sends email.
MailMessage.javaClass A simple mail message object.
MessageConstants.javaClass Constants for messages loaded from resource bundles.
OpenFileLog.javaClass A logger that opens the file for each log entry and closes it after it's done writing.
PerChannelPolicy.javaClass A policy that can make decision on a per-channel basis. It maintains a default log mask and channel list itself, but also has a list of "policy groups" that each have a log mask and channel list of their own in addition to a list of channel names that their mask and channel list applies to.
PerClassPolicy.javaClass A policy that can make decision on a per-class basis. It maintains a default log mask and channel list itself, but also has a list of "policy groups" that each have a log mask and channel list of their own in addition to a list of class names that their mask and channel list applies to.
PerformanceTest.javaClass A performance testing rig for Syslog.
PrintWriterLog.javaClass An implementation of an object that will log things using the Syslog facility.
RemoteLog.javaClass A logger that sends messages to remote receivers bound in JNDI. Object bound directly under the "com.protomatter.syslog.remote" location in JNDI will receive the log message if they implement the RemoteLogReceiver RemoteLogReceiver interface.

When calling methods on the remote objects, they are first run through PortableRemoteObject.narrow() to ensure everything is OK.

RemoteLogReceiver.javaInterface An interface for loggers that are receiving messages from a remote machine via RMI.
RemoteLogReceiverImpl.javaClass A simple implementation of the RemoteLogReceiver interface.
SimpleLogPolicy.javaClass The default LogPolicy that knows about log levels and channels.
SimpleSyslogMailSubjectFormatter.javaClass A simple mail subject formatter.
SimpleSyslogTextFormatter.javaClass A simple log entry formatter.
SMTPMailTransport.javaClass A simple class that talks SMTP to servers.
StringDatabaseLogStatementAdapter.javaClass A log adapter that uses the setString() method to set details.
Syslog.javaClass This class implements a system-wide logging utility.
SyslogChannelAware.javaInterface An interface for objects that are aware of channels in syslog.
Syslogger.javaInterface An interface for objects that will log things using the Syslog facility.
SyslogHandler.javaClass A JDK 1.4 logging system handler to route messages into Syslog.
SyslogHTMLMailFormatter.javaClass A simple HTML log entry formatter for email.
SyslogInitException.javaClass An exception during the syslog init process.
SyslogMailSubjectFormatter.javaInterface The interface for the pluggable message subject formatting system.
SyslogMessage.javaClass A utility class representing all the information needed to make a syslog call.
SyslogServer.javaClass A standalone log processing server which either reads messages from a JMS topic, or through RMI. Reads configuration information from a properties file, given as the first command-line argument. System properties will override ones given in the properties file.

Basic properties are:

    name value
    Syslog.config.xml Path to a syslog configuration XML file. Messages are pulled off of JMS and sent into the "local" Syslog instance for processing according to this configuration file.

If the server will listen to a JMS topic for messages, the following properties are used:

    name value
    jms.topic The JNDI name of the JMS topic to listen to.
    jms.connection.user A location in JNDI where an instance of javax.jms.TopicConnectionFactory can be found.
    jms.connection.pass Optional.
    SyslogT3Startup.javaClass Configure syslog to start when WebLogic does.
    SyslogTextFormatter.javaInterface The interface for the pluggable text formatting system.
    SyslogWriter.javaClass A Writer that is attached to Syslog.
    TimeRolloverLog.javaClass A logger that will roll files when the minute, hour, day, week or month change.
    UNIXSyslogLog.javaClass A logger that sends UDP packets to a UNIX syslog server. This logger sends UDP packets to UNIX servers running a BSD-style syslogd daemon.
    Wl6SyslogTextFormatter.javaClass A log formatter that mimics the log output from WebLogic Server 6.x.
    WlSyslogTextFormatter.javaClass A log formatter that mimics the log output from WebLogic.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.