I recently had some issues with errors being counted at the end summary but the console output and log files not showing what the errors were. It isn't exactly clear how all of the verbosity and logging options work, I ended up with these questions.
The changelog says that the -v parameter can be specified multiple times. How many times results in the most verbose output? Is it the same for every operation?
Does -v have the same effect on a -l log, or does the log always contain a pre-determined level of verbose output?
When a logfile is specified with -l, the console output is automatically limited to showing only progress indicators and fatal errors. If the log is always a set level, then -v has no effect when -l is specified? And then if -v has no effect on the logfile, can the parameter instead be used to increase the level of console output (as it does without -l)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"-v" option is not like linux verbosity levels but is setting it to '+1' which is the highest level of verbosity. Additional is increasing the msglevel but there are no higher levels, ie more to log. "-q" will reduce the msglevel and skip bar, progress, info, status in that order.
The '-v' and '-q' is only effecting the standard output and not the logfile output.
The logfile output is hardcoded except for "error" which is either logged to file or if logfile not specified is printed to error output, not both.
/X
The logging "description" is in "support.h" file.
#defineMSG_STATUS-3#defineMSG_INFO-2#defineMSG_PROGRESS-1#defineMSG_BAR0#defineMSG_VERBOSE1*Fatalerrormessages.*Messagesprintedbeforeanearlytermination.*Thesemessagesgointhelogfileandinstderrinconditionally.*Unexpectederrormessages.*Messagesreportingerrorconditionsthatdon't prevent the program to run. * Some of them could be also serious errors, like "silent errors". * In such case, the summary result is always printed as error, * and we are sure to notify the user in some way. * These messages go in the log file if specified, otherwise they go in stderr. * Expected error messages, without fallback to stderr. * These errors are "someway" expected, and then they never go to screen. * For example, when undeleting missing files, the messages for missing files * are not shown. * These messages go in the log file if specified, otherwise they are lost. * Tag messages. * Messages are in tag format, like "tag:entry:...". * These messages never go on the screen, but only in the log file if specified. * State messages. * Messages that tell what the program is doing or did, but limited to few lines. * They are status information, and summary results. * Info messages. * Messages that tell what was done. * Potentially a lot of messages are possible. They can still be on the screen, * as losing them we don'tloseinformation.*Thesemessagesnevergointhelogfile,becauaethereisalwaysacorrespondinglog_tag().*Progressmessages.*Messagethattelltheprogressofprogram.*Thesemessagesalsogointhelogfile.*Progressbarmessages.*Messagethatshowthepercentageoftheprogress.*Thesemessagesnevergointhelogfile.*Thesemessagesarebuffered.Usemsg_flush()toflushthem.*Verbosemessages.*Messagethattellwhatisalreadyexpected.*Thesemessagesalsogointhelogfile.
Last edit: xad 2015-06-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Changelog is wrong about -v. There is only one verbosity level, and specifying it more than one time has no effect.
Also, -q and -v have no effect on the log. They affect only the console output.
When you specify -l, unexpected errors are redirected to the log files instead of going to the console output.
Instead fatal errors are instead always printed on both.
Ciao,
Andrea
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I could piggyback onto this discussion, I recently began using SnapRAID and ran a check command with -l specified. When I viewed the logfile, the summary at the end shows that two errors occurred, but the error details do not appear anywhere in the body of the log.
This seems to contradict what is being said here, so maybe somebody can provide more insight as to why this might happen and how I can locate the source of the errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do have the log, although I was hesitant in posting it without heavily editing filenames, etc, before posting on a public forum. I could send it directly to you if it would be of any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently had some issues with errors being counted at the end summary but the console output and log files not showing what the errors were. It isn't exactly clear how all of the verbosity and logging options work, I ended up with these questions.
The changelog says that the -v parameter can be specified multiple times. How many times results in the most verbose output? Is it the same for every operation?
Does -v have the same effect on a -l log, or does the log always contain a pre-determined level of verbose output?
When a logfile is specified with -l, the console output is automatically limited to showing only progress indicators and fatal errors. If the log is always a set level, then -v has no effect when -l is specified? And then if -v has no effect on the logfile, can the parameter instead be used to increase the level of console output (as it does without -l)?
Reading the v8.1 code:
"-v" option is not like linux verbosity levels but is setting it to '+1' which is the highest level of verbosity. Additional is increasing the msglevel but there are no higher levels, ie more to log. "-q" will reduce the msglevel and skip bar, progress, info, status in that order.
The '-v' and '-q' is only effecting the standard output and not the logfile output.
The logfile output is hardcoded except for "error" which is either logged to file or if logfile not specified is printed to error output, not both.
/X
The logging "description" is in "support.h" file.
Last edit: xad 2015-06-19
Hi Quaraxkad,
The Changelog is wrong about -v. There is only one verbosity level, and specifying it more than one time has no effect.
Also, -q and -v have no effect on the log. They affect only the console output.
When you specify -l, unexpected errors are redirected to the log files instead of going to the console output.
Instead fatal errors are instead always printed on both.
Ciao,
Andrea
If I could piggyback onto this discussion, I recently began using SnapRAID and ran a check command with -l specified. When I viewed the logfile, the summary at the end shows that two errors occurred, but the error details do not appear anywhere in the body of the log.
This seems to contradict what is being said here, so maybe somebody can provide more insight as to why this might happen and how I can locate the source of the errors.
Hi flvinny521,
If it happens again, please report more details, including log.
I checked all the error conditions, and it seems to me that something is always printed. Maybe it's something not easily recognizable as error.
Ciao,
Andrea
I do have the log, although I was hesitant in posting it without heavily editing filenames, etc, before posting on a public forum. I could send it directly to you if it would be of any help.
Here's my thread on a similar issue: https://sourceforge.net/p/snapraid/discussion/1677233/thread/4d77a399
In the end I just ran the "-e fix" and haven't seen any issues or errors since.
Cheers.
Last edit: MQMan 2015-06-23