KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > monolog > file > api > Pattern


1 /**
2  * Copyright (C) 2001-2003 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.util.monolog.file.api;
20
21 /**
22  * This interface decribes the special characters used to describe a pattern.
23  * All special characters must be prefix by '%'. Here is an example of
24  * pattern: <br/>
25  * %l %t %m%n <br/>
26  * This pattern will print on a single line the level, the topic name and the
27  * message.
28  *
29  * @author Sebastien Chassande-Barrioz
30  */

31 public interface Pattern {
32
33     /**
34      * This character represents the level name of the message
35      */

36     char LEVEL = 'l';
37
38     /**
39      * This character represents the topic of the logger
40      */

41     char TOPIC = 't';
42
43     /**
44      * This character represents the date where the message has been logged
45      */

46     char DATE = 'd';
47
48     /**
49      * The theard name which has logged the message.
50      */

51     char THREAD = 'h';
52
53     /**
54      * The message which has been logged
55      */

56     char MESSAGE = 'm';
57
58     /**
59      * This character represents the method in which the log method was called.
60      * Generating caller location information is extremly slow.
61      */

62     char METHOD = 'M';
63
64     /**
65      * This character represents the class name in which the log method was
66      * called. Generating caller location information is extremly slow.
67      */

68     char OBJECT = 'O';
69
70     /**
71      * This character represents the line number in the source code where the
72      * log method was called. Generating caller location information is
73      * extremly slow.
74      */

75     char LINE_NUMBER = 'L';
76
77     /**
78      * This character is the prefix of all special character
79      */

80     char PREFIX = '%';
81
82     /**
83      * This character represents a new line.
84      */

85     char NEW_LINE = 'n';
86
87
88 }
89
Popular Tags