Skip to content

Commit 05c2979

Browse files
author
Oleg Ekhlakov
committed
Updated the settings example
1 parent b69ed41 commit 05c2979

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ Create `maskdump.conf` in the same directory as the binary or specify path with
7575

7676
```json
7777
{
78-
"cache_path": "/path/to/cache.json",
78+
"cache_path": "/home/user/.cache/maskdump/cache.json",
7979
"email_regex": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\\b",
8080
"phone_regex": "(?:\\+7|7|8)?(?:[\\s\\-\\(\\)]*\\d){10}",
81-
"email_white_list": "/path/to/white_list_email.txt",
82-
"phone_white_list": "/path/to/white_list_phone.txt",
81+
"email_white_list": "/home/user/.config/maskdump/white_list_email.txt",
82+
"phone_white_list": "/home/user/.config/maskdump/white_list_phone.txt",
8383
"memory_limit_mb": 1024,
8484
"cache_flush_count": 1000,
85-
"skip_insert_into_table_list": "/path/to/skip_table_list.txt",
85+
"skip_insert_into_table_list": "/home/user/.config/maskdump/skip_table_list.txt",
8686
"masking": {
8787
"email": {
88-
"target": "username:2-",
88+
"target": "username:1~1",
8989
"value": "hash:6"
9090
},
9191
"phone": {
@@ -101,9 +101,14 @@ Create `maskdump.conf` in the same directory as the binary or specify path with
101101
"b_socialservices_user": {
102102
"email": ["EMAIL"]
103103
}
104+
},
105+
"logging": {
106+
"path": "/var/log/maskdump.log",
107+
"level": "info"
104108
}
105109
}
106110
```
111+
For logging / level, the possible values are "debug", "info", "warn", and "error".
107112

108113
### White lists
109114

@@ -238,17 +243,17 @@ mysqldump dbname | ./maskdump --mask-email=light-hash --mask-phone=light-mask >
238243

239244
```json
240245
{
241-
"cache_path": "/path/to/cache.json",
246+
"cache_path": "/home/user/.cache/maskdump/cache.json",
242247
"email_regex": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\\b",
243248
"phone_regex": "(?:\\+7|7|8)?(?:[\\s\\-\\(\\)]*\\d){10}",
244-
"email_white_list": "/path/to/white_list_email.txt",
245-
"phone_white_list": "/path/to/white_list_phone.txt",
249+
"email_white_list": "/home/user/.config/maskdump/white_list_email.txt",
250+
"phone_white_list": "/home/user/.config/maskdump/white_list_phone.txt",
246251
"memory_limit_mb": 1024,
247252
"cache_flush_count": 1000,
248-
"skip_insert_into_table_list": "/path/to/skip_table_list.txt",
253+
"skip_insert_into_table_list": "/home/user/.config/maskdump/skip_table_list.txt",
249254
"masking": {
250255
"email": {
251-
"target": "username:2-",
256+
"target": "username:1~1",
252257
"value": "hash:6"
253258
},
254259
"phone": {
@@ -264,9 +269,14 @@ mysqldump dbname | ./maskdump --mask-email=light-hash --mask-phone=light-mask >
264269
"b_socialservices_user": {
265270
"email": ["EMAIL"]
266271
}
272+
},
273+
"logging": {
274+
"path": "/var/log/maskdump.log",
275+
"level": "info"
267276
}
268277
}
269278
```
279+
Для logging / level возможные значения: "debug", "info", "warn", "error"
270280

271281
### Белые списки
272282

0 commit comments

Comments
 (0)