-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.json
97 lines (97 loc) · 4.49 KB
/
config.json
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
{
"name": "emLogger - Logging Utility",
"namespace": "Stanford\\emLogger",
"description": "An optional logging utility used by many other external modules built at Stanford. If configured, supported modules will write debug and error logs to a text file supplied in a config parameter. This can be especially useful for debugging and problem solving when logs do not belong in the redcap project logging",
"documentation": "README.md",
"versions": [
{
"0.1": "Initial",
"0.2": "5/4/2021 Added support for a single-file mode",
"0.3": "9/1/2021 Added support for Google Cloud Project logging",
"0.4": "2/25/2022 Tweaked logging format and added process id"
}
],
"framework-version": 5,
"authors": [
{
"name": "Andrew Martin",
"email": "andy123@stanford.edu",
"institution": "Stanford University"
},
{
"name": "Jae Lee",
"email": "jael@stanford.edu",
"institution": "Stanford University"
},
{
"name": "Ihab Zeedia",
"email": "ihabz@stanford.edu",
"institution": "Stanford University"
}
],
"permissions": [
"redcap_module_save_configuration"
],
"links": {
"control-center": [
]
},
"system-settings": [
{
"key": "instructions",
"name": "<div class='alert alert-warning'><b>You should leave the top three checkboxes (Enable module and Make Discoverable and Allow users to enable) UNCHECKED.</b><br/>The logging features will still be available to other modules even if it is not enabled on a per-project basis<br/>You can leave both log options unchecked to deactivate any logging. If you are expecting logs and not seeing then, make sure the module that is logging has debug logs enabled in the external module configuration page for that module</div>",
"type": "descriptive"
},
{
"key": "base-server-path",
"name": "<b>Base path on server where logs are written</b><br>(<i>e.g.</i> <code>/var/log/redcap/</code> - <u>don't forget to include ending slash</u>)",
"required": true,
"type": "text"
},
{
"key": "mode-alert",
"name": "<b>You must select at least one of the two logging options below or else no logs will be written</b>",
"type": "descriptive"
},
{
"key": "log-json",
"name": "<b>Check to log in json format</b><br><i>(emError logs will include a backtrace)",
"required": false,
"type": "checkbox"
},
{
"key": "log-tsv",
"name": "<b>Check to log in tab-separated-value (TSV) format</b>",
"required": false,
"type": "checkbox"
},
{
"key": "single-file",
"name": "<b>Single-File mode</b> <i>(optional)</i><br/>Normally, each External Module receives its own log file. However, if you are shipping logs to another process it is easier to monitor just a single file. If checked, a new column corresponding to the module name is added and all logged output goes into a single file called em_logger.log or em_logger.json",
"required": false,
"type": "checkbox"
},
{
"key": "single-file-cleanup",
"name": "<b>Enable Weekly Log File Clearing</b> <i>(optional)</i><br/>If checked AND using single-file mode, a cron job will clear the single log file every Sunday a midnight to prevent it from growing too large. This is designed for cases where you are shipping your logs off the server to another tool",
"required": false,
"type": "checkbox"
},
{
"key": "gcp-project-id",
"name": "<b>GCP Logging</b> <i>(optional--special use)</i><br/>Provide the Google Cloud Project Name and emLogger will write its logs into that StackDriver for that project.<br/>The service account running this server must have permission to access StackDriver account.",
"required": false,
"type": "text"
}
],
"crons": [
{
"cron_name": "truncate_logs_cron",
"cron_description": "A weekly cron to clear out the log file every Sunday at midnight",
"method": "truncateLogsCron",
"cron_hour": 0,
"cron_minute": 0,
"cron_weekday": 0
}
]
}