root/trunk/src/main/php/net/stubbles/util/log/stubLogData.php

Revision 1281, 1.6 kB (checked in by mikey, 4 months ago)

code nazi :)

Line 
1 <?php
2 /**
3  * Interface for log data.
4  *
5  * @author      Frank Kleine <mikey@stubbles.net>
6  * @package     stubbles
7  * @subpackage  util_log
8  */
9 /**
10  * Interface for log data.
11  *
12  * The log data object is used to collect the data to log.
13  *
14  * @package     stubbles
15  * @subpackage  util_log
16  */
17 interface stubLogData extends stubObject
18 {
19     /**
20      * registry key for request class to be used
21      */
22     const CLASS_REGISTRY_KEY = 'net.stubbles.util.log.class';
23     /**
24      * default seperator to be used to seperate the log fields
25      */
26     const SEPERATOR = '|';
27
28     /**
29      * adds data to the log object
30      *
31      * Each call to this method will add a new field.
32      *
33      * @param  string  $data
34      */
35     public function addData($data);
36
37     /**
38      * returns the whole log data as one line
39      *
40      * @return  string
41      */
42     public function get();
43
44     /**
45      * returns the level of the log data
46      *
47      * @return  int
48      * @see     stubLogger::LEVEL_*
49      */
50     public function getLevel();
51
52     /**
53      * returns the target where the log data should go to
54      *
55      * How the target is interpreted depends on the log appender which
56      * takes the log data. A file log appender might use this as the basename
57      * of a file, while a database log appender might use this as the name
58      * of the table to write the log data into. Therefore it is advisable to
59      * only use ascii characters, numbers and underscores to be sure that the
60      * log appender will not mess up the log data.
61      *
62      * @return  string
63      */
64     public function getTarget();
65 }
66 ?>
Note: See TracBrowser for help on using the browser.