KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > walend > somnifugi > SomniLogger


1 package net.walend.somnifugi;
2
3 import java.util.logging.Logger JavaDoc;
4 import java.util.logging.Level JavaDoc;
5
6 /**
7 A local logger singleton.
8 <p>
9 Logging in Somnifugi should follow these guidelines:
10 <p>
11 <ul>
12 <li>SEVERE - RuntimeExceptions, any time a MessageListener dies.
13 <li>WARNING - JMSExceptions sent to the SomniDefaultExceptionListener, any time a Message is lost, other unhandled Exceptions. Redelivery attempts.
14 <li>INFO - Suggestions to improve client code.
15 <li>CONFIG - Any time a JMSConnection or JMSDestination gets created or renamed.
16 <li>FINE - Any time a Session gets created or renamed. starts, stops and closes. Setting MessageListeners.
17 <li>FINER - Any time a Consumer or Producer gets created or renamed, started, stoped or closed. MessageConsumer's receive() returns null. Creating a new ChannelFactory.
18 <li>FINEST - All Messages sent. Creating new Channels in a ChannelFactory
19
20 </ul>
21 <p>
22
23 @author <a HREF="http://walend.net">David Walend</a> <a HREF="mailto:david@walend.net">david@walend.net</a>
24  */

25
26 //todo special logging object for messages.
27
class SomniLogger
28 {
29     static final Logger JavaDoc IT = Logger.getLogger("net.walend.somnifugi");
30
31     /*
32     static
33     {
34         Logger.getLogger("").getHandlers()[0].setLevel(Level.ALL);
35         IT.setLevel(Level.ALL);
36     }
37     */

38 }
39
40 /* Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 David Walend
41 All rights reserved.
42
43 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44
45 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
46
47 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
48
49 Neither the name of the SomnifugiJMS Project, walend.net, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission from David Walend.
50
51 Credits in redistributions in source or binary forms must include a link to http://somnifugi.sourceforge.net .
52
53 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 The net.walend.somnifugi.sql92 package is modified code from the openmq project, https://mq.dev.java.net/ , Copyright (c) of Sun, and carries the CDDL license, repeated here: You can obtain a copy of the license at https://glassfish.dev.java.net/public/CDDLv1.0.html. See the License for the specific language governing permissions and limitations under the License.
55
56 =================================================================================
57
58 For more information and the latest version of this software, please see http://somnifugi.sourceforge.net and http://walend.net or email <a HREF="mailto:david@walend.net">david@walend.net</a>.
59  */

60
Popular Tags