wxf4150 / esdump

elasticserch dump import export
8 stars 5 forks source link

Less Verbose logging by default #2

Closed preussal closed 2 years ago

preussal commented 2 years ago

It would not be bad if you could deactivate the verbose logging.

I think that's something too much info

2021/08/14 16:44:58 total exported 200 items; total_raw_bytes: 0.25 MB
2021/08/14 16:44:58 total exported 400 items; total_raw_bytes: 0.49 MB
2021/08/14 16:44:58 total exported 600 items; total_raw_bytes: 0.74 MB
2021/08/14 16:44:58 total exported 800 items; total_raw_bytes: 0.98 MB
2021/08/14 16:44:58 total exported 1000 items; total_raw_bytes: 1.22 MB
2021/08/14 16:44:58 total exported 1200 items; total_raw_bytes: 1.47 MB
2021/08/14 16:44:58 total exported 1400 items; total_raw_bytes: 1.71 MB
2021/08/14 16:44:58 total exported 1600 items; total_raw_bytes: 1.96 MB
2021/08/14 16:44:58 total exported 1800 items; total_raw_bytes: 2.20 MB
2021/08/14 16:44:58 total exported 2000 items; total_raw_bytes: 2.45 MB
2021/08/14 16:44:58 total exported 2200 items; total_raw_bytes: 2.69 MB
2021/08/14 16:44:58 total exported 2400 items; total_raw_bytes: 2.94 MB
2021/08/14 16:44:58 total exported 2600 items; total_raw_bytes: 3.18 MB
2021/08/14 16:44:58 total exported 2800 items; total_raw_bytes: 3.43 MB
2021/08/14 16:44:58 total exported 3000 items; total_raw_bytes: 3.67 MB

That would be sufficient.

2021/08/14 16:44:58 execute  export
2021/08/14 16:44:58 export index shrink-IndexName-000090 to -
2021/08/14 16:44:58 init elasticsearch Client  with url: http://hostname:9200
2021/08/14 16:44:58 export match: {"match_all":{}}
2021/08/14 17:05:59 total exported 2270609 items; total_raw_bytes: 5569.41 MB;the gzip size: 391.23 MB
2021/08/14 17:05:59 export time spend 21m45.181175851s

maybe also adjustable, so every 1000 or 10000 items a log line

2021/08/14 16:44:58 total exported 2000 items; total_raw_bytes: 2.94 MB
2021/08/14 16:45:58 total exported 3000 items; total_raw_bytes: 4.18 MB
2021/08/14 16:46:58 total exported 4000 items; total_raw_bytes: 6.43 MB
2021/08/14 16:47:58 total exported 5000 items; total_raw_bytes: 8.67 MB
.
.

So only a suggestion from me.

Greetings Preussal

wxf4150 commented 2 years ago

i have set log progress every 10000 doccuments, for Less Verbose logging.

when export spend long time, the screen will have some active msg.