-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.js
86 lines (72 loc) · 1.36 KB
/
demo.js
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
import { system, error, report, config, misc, getConfig } from 'console-dictation'
/**
* Base tests
*/
system('base system test')
error('base error test')
misc('base misc test')
console.log('current configs', getConfig())
/**
* config writes
*/
system('system config writes', {
PATH: './logs/test',
LOG_NAME: 'test.log'
})
error('error config writes', {
PATH: './logs/test',
LOG_NAME: 'test.log'
})
/**
* Generic writes
*/
report({
type: 0,
message: 'generic system write'
})
/**
* Generic configured writes
*/
report({
type: 0,
message: 'generic configured system write',
path: {
PATH: './logs/test',
LOG_NAME: 'test.log'
}
})
/**
* Configuration
*/
config({
paths: {
'SYS': './logs/system'
},
log_names: {
'SYS': 'system.log'
},
indexing_config: {
indexing: true
}
})
console.log('configs after change', getConfig())
/**
* Base writes with indexing
*/
system('system base write post-config')
misc('misc base write post-config, 1')
misc('misc base write post-config, 2')
misc('misc base write post-config, 3')
misc('misc base write post-config, 4')
/**
* Configuring dependencies
*/
config({
indexing_config: {
dependencies: {
SYS: ['misc', 'error']
}
}
})
system('system base write post-dependency config')
console.log('configs after config change', getConfig())