-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
55 lines (49 loc) · 1.21 KB
/
Copy pathreadme.txt
File metadata and controls
55 lines (49 loc) · 1.21 KB
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
Readme
Enabling:
SweetLog.enable();
Basic Setup (see rest for descriptions):
SweetLog.enable();
SweetLog.setLevel('info');
SweetLog.setTags('all');
Usage:
SweetLog.info('here I am')
=> here I am
Available Functions: SweetLog.debug, SweetLog.info, SweetLog.warn, SweetLog.error, SweetLog.inspect
Log Levels:
Setting Log Level:
SweetLog.setLevel('info')
Available Levels: 'debug', 'info', 'warn', 'error'
Example:
SweetLog.info('here I am')
=> here I am
SweetLog.setLevel('warn')
SweetLog.info('here I am')
=>
SweetLog.error('here I am')
=> here I am
Tagging:
Setting Tags:
SweetLog.setTags('users', 'people')
setting tags to 'all' will show all tags
tags must be a splatted array
If one of the logging tags match the SweetLog set tags then it will show
Example:
SweetLog.setTags('all')
SweetLog.info('here I am')
=> here I am
SweetLog.info('here I am', 'users')
=> here I am
SweetLog.setTags('users')
SweetLog.info('here I am')
=>
SweetLog.info('here I am', 'users')
=> here I am
SweetLog.setTags('users', 'people', 'friends')
SweetLog.info('here I am', 'people')
=> here I am
SweetLog.info('here I am', 'rivals', 'people')
=> here I am
SweetLog.info('here I am', 'rivals')
=>
To see the settings:
SweetLog.settings()