-
Notifications
You must be signed in to change notification settings - Fork 1
/
bisq-watcher.config.sample.mjs
89 lines (85 loc) · 3.53 KB
/
bisq-watcher.config.sample.mjs
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
/**
* bisq-watcher Application Configuration File
*
* @typedef {Object} WatcherConfig
* @property {string} [name] - The name of the watcher. If present all messages will be prefixed with this name.
* @property {string} logFile - The location of the Bisq log file.
* @property {TransportConfig[]} transports - Array of transport configurations.
* @property {DebugConfig} [debug] - Debug configurations for the watcher.
* @property {OverwriteRuleConfig[]} [overwriteRules] - Optional. Array of overwrite rule configurations for the watcher.
*/
/**
* Transport Configuration
*
* @typedef {Object} TransportConfig
* @property {'console'|'telegram'|'file'} type - Type of logger
* @property {string} [apiToken] - API Token for telegram. Required if type is 'telegram'.
* @property {string[]} [chatIds] - Chat IDs for telegram. Required if type is 'telegram'.
* @property {boolean|string} [timestamp=flase] - Whether to include timestamp. Can also be a formatting string (see https://day.js.org/docs/en/display/format).
* @property {'crit'|'alert'|'error'|'warning'|'notice'|'info'|'debug'} [maxLevel='info'] - Maximum log level the logger transport will log (crit = 0 and debug =7).
* @property {boolean} [disabled=false] - Whether this logger is enabled.
* @property {OverwriteRuleConfig[]} [overwriteRules] - Array of rule configurations for the logger.
*/
/**
* Overwrite Rule Configuration for logger
*
* @typedef {Object} OverwriteRuleConfig
* @property {string} eventName - The name of the rule to overwrite.
* @property {string} [message] - A template string for formatting the message to emit.
* @property {'crit'|'alert'|'error'|'warning'|'notice'|'info'|'debug'} [level] - Overwrites the severity level of the original log event from Bisq log.
* @property {boolean} [sendToTelegram=true] - Flag indicating whether to send the message to Telegram.
* @property {'active'|'inactive'} [activation] - Forces a rule do become active or not for respective watcher or transport
*
* This key is optional. When present, it is used to overwrite the default rules
* found in the '/server/rules/' folder. Specific `eventName` parameters will
* overwrite the default rule: transport rule overwrites watcher rule, which
* in turn overwrites the default rule.
*/
/**
* Debug Configuration for watcher
*
* @typedef {Object} DebugConfig
* @property {boolean} [atStartProcessEntireLogFile=true] - Flag indicating whether existing logfile should be read and process at application start.
* @property {number} [overlappingGoBackNPositions] - Size in bytes for buffer overlapping when reading Bisq logfile.
* @property {boolean} [useHash=true] - Flag indicating whether cached log events should be stored in clear text or hashed.
*/
export default {
name: 'main',
logFile: '%USERPROFILE%\\AppData\\Roaming\\Bisq\\bisq.log',
transports: [
{
type: 'telegram',
apiToken: "xxxxxxxxx:xxxxxxxxxxxxxxxxxxxxx-xxxxx",
chatIds: ['135792468'],
maxLevel: 'notice',
disabled: true,
},
{
type: 'console',
timestamp: 'MMM DD, HH:MM:ss.SSS',
maxLevel: 'debug',
overwriteRules: [
{
eventName: 'BlockchainDownloadProgressTracker',
activation: 'active',
},
{
eventName: 'End of sync detected',
activation: 'active',
},
],
},
{
type: 'file',
filename: './logs/app.log',
timestamp: true,
maxLevel: 'debug',
disabled: true,
},
],
debug: {
atStartProcessEntireLogFile: false,
},
overwriteRules: [
]
}