blob: 481bfc3d0ca8c2a3e43629b2aa29ff189b9a91d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
// +---------------------------------------------------------------------------
// | SWAN [ $_SWANBR_SLOGAN_$ ]
// +---------------------------------------------------------------------------
// | Copyright $_SWANBR_COPYRIGHT_$
// +---------------------------------------------------------------------------
// | Version $_SWANBR_VERSION_$
// +---------------------------------------------------------------------------
// | Licensed ( $_SWANBR_LICENSED_URL_$ )
// +---------------------------------------------------------------------------
// | $_SWANBR_WEB_DOMAIN_$
// +---------------------------------------------------------------------------
namespace Kafka;
/**
+------------------------------------------------------------------------------
* Kafka protocol since Kafka v0.8
+------------------------------------------------------------------------------
*
* @package
* @version $_SWANBR_VERSION_$
* @copyright Copyleft
* @author $_SWANBR_AUTHOR_$
+------------------------------------------------------------------------------
*/
class Log
{
// {{{ consts
// }}}
// {{{ members
/**
* log
*
* @var mixed
* @access private
*/
private static $log = null;
// }}}
// {{{ functions
// {{{ public static function setLog()
/**
* setLog
*
* @access public
* @return void
*/
public static function setLog($log)
{
if ($log) {
self::$log = $log;
}
}
// }}}
// {{{ public static function log()
/**
* log
*
* @access public
* @return void
*/
public static function log($message, $level = LOG_DEBUG)
{
if (self::$log && method_exists(self::$log, 'log')) {
self::$log->log($message, $level);
}
}
// }}}
// }}}
}
|