-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
112 lines (51 loc) · 2.13 KB
/
README.txt
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
This extension includes Chrome Logger (previously known as ChromePhp) script. It also provides short functions to quick use
and developer ip control (devIPMask).
@See https://craig.is/writing/chrome-logger
All copyright to Chrome Logger. This TYPO3 extension only includes it to automatic use in TYPO3 environment.
If you have better ideas, how this extension could work, or what to improve, write me: wolo.wolski(at)gmail.com
MANUAL:
You don't need to include any script in code - just install this extension
and Chrome Logger extension for Chrome:
https://chrome.google.com/webstore/detail/chrome-logger/noaneddfkdjfnfdakjjmocngnfkfehhd
(Chrome Logger has to be enabled in browser using button on toolbar)
USAGE:
You can use it two ways:
** Original:
ChromePhp::info($var);
which displays debug always - not filtered by IP
(see manual of ChromePhp or search web for details)
** Quick secured:
cp($var);
which can display only when devIPmask is matched.
This can be disabled on install / in extension configuration.
Developer ip mask can be set in Install Tool on directly in typo3conf/localconf.php:
$TYPO3_CONF_VARS['SYS']['devIPmask'] = '1.2.3.4';
or only notice:
cp('something');
or with message type:
cp($var, 'info');
Types of debug display are:
warn
error
info
you can pass them as third param:
cp($var, 'something', 'warn');
...or use shorts:
cpInfo($var, 'something');
cpWarn($var, 'something');
cpError($var, 'something');
You can also use groups:
cpGroup('my group'); // type 'group', or:
cpGroup('my group', true); // type 'groupCollapsed'
// here some cp() calls
// and
cpGroupEnd();
KNOWN PROBLEMS:
- Debugging of objects seems not to work in current version of Chrome Logger ext (4.1.0)
- The grouping seems not to work in current version of Chrome Logger ext (4.1.0)
- if you use in same time both ways, eg:
cp('abc', $var);
ChromePhp::log('abc', $var);
the second call won't have a backtrace file path. It's because the value of backtrace
level is increased in typo extension include file (has to, to show it correctly) and
later is stored because ChromePhp is a singleton.