gilbertchen / duplicacy

A new generation cloud backup tool
https://duplicacy.com
Other
5.24k stars 339 forks source link

Log customizing #99

Open Ithilion opened 7 years ago

Ithilion commented 7 years ago

Hi, I think the logging functionality of the CLI could be improved. These things come to my mind:

gilbertchen commented 7 years ago

The current default setting is to display INFO, WARN, and ERROR logs. The -v switch adds TRACE and -d adds DEBUG. More switches should be added, for instance, to show ERROR logs but not others.

Independent of the log-level setting I think there should be another selector that is based on the log id (the first argument passed to the LOG_* functions). For example, for the following log line in duplicacy_chunkuploader.c:

    LOG_DEBUG("CHUNK_UPLOAD", "Chunk %s has been uploaded", chunkID)

if you enable the log id CHUNK_UPLOAD, then the log message 'Chunk xxx has been uploaded' should be shown regardless of what log level is currently enabled.

sergeevabc commented 6 years ago

+1 for a switch to output errors only. Cannot stress enough how important such switch is when one backs up zillions of files and just a few are troublesome.

ghmia commented 5 years ago

+1 for a switch to output more basic info only with -log. No need to report every file uploaded.