1: <?php
2:
3: namespace Charcoal\App\Config;
4:
5:
6: use \Charcoal\Config\AbstractConfig;
7:
8: 9: 10:
11: class LoggerConfig extends AbstractConfig
12: {
13: 14: 15:
16: private $active;
17:
18: 19: 20:
21: private $handlers;
22:
23: 24: 25:
26: private $processors;
27:
28: 29: 30:
31: public function defaults()
32: {
33: return [
34: 'active' => true,
35: 'namespace' => 'Charcoal',
36: 'level' => 'debug',
37: 'handlers' => [
38: 'stream' => [
39: 'type' => 'stream',
40: 'stream' => '../charcoal.app.log',
41: 'level' => null,
42: 'bubble' => true,
43: 'active' => true
44: ],
45: 'console' => [
46: 'type' => 'browser-console',
47: 'level' => null,
48: 'active' => false
49: ]
50: ],
51: 'processors' => [
52: [
53: 'type' => 'memory-usage'
54: ],
55: [
56: 'type' => 'uid'
57: ]
58: ]
59: ];
60: }
61:
62: 63: 64: 65:
66: public function setActive($active)
67: {
68: $this->active = !!$active;
69: return $this;
70: }
71:
72: 73: 74:
75: public function active()
76: {
77: return $this->active;
78: }
79:
80: 81: 82: 83:
84: public function setHandlers(array $handlers)
85: {
86: $this->handlers = $handlers;
87: return $this;
88: }
89:
90: 91: 92:
93: public function handlers()
94: {
95: return $this->handlers;
96: }
97:
98: 99: 100: 101:
102: public function setProcessors(array $processors)
103: {
104: $this->processors = $processors;
105: return $this;
106: }
107:
108: 109: 110:
111: public function processors()
112: {
113: return $this->processors;
114: }
115: }
116: