#136 Issue closed: Disable redirects in debug mode

Labels: support / question

cal-s opened issue at 2012-07-26 14:31:

Please consider disabling ">&2" redirects in scripts when in debug mode, allowing commands to fully display what they're doing, esp during things like filesystem creation

dagwieers commented at 2012-07-26 15:08:

So you mean redirecting &2 to stdout, or instead to the log file ?

I thought we already did this... What is the current behavior and what do you expect ?

cal-s commented at 2012-07-26 17:25:

errr ... stdout would be my vote for debug messages. Can you do both?

dagwieers commented at 2012-07-27 23:05:

I don't see the point in having command output being send to the screen at all. It belongs in the log file, together with the executed commands, shell debugging and log messages. Why would you want this on screen rather than in a log that can be inspected, scrolled, transferred, ... ?

cal-s commented at 2012-07-30 17:47:

Realtime process context, not to to say that logging isn't necessary, too. I needed to remove by hand them to see that disks aren't being labelled when their filesystems are being created.

  • cal

dagwieers commented at 2012-07-30 21:34:

There's no data purged so I don't see the need for real-time data here. (Nothing that less or tail cannot already match)

But feel free to propose a pull request with a good argumentation and maybe someone finds the implementation useful.

cal-s commented at 2012-08-10 14:02:

Thing is, watching rear.log as rear operates requires either a second ssh session to the system being restored or running rear in single step mode so that it can be backgrounded in order to check the log. However, i maintain that it is a pain and unproductive to be bouncing back and forth between the recovery console and second a log-monitoring terminal. IMHO, some of the silent redirects, esp in the disk layout sections,are unnecessary. Let debug dump a ton of information - that's what debugging does. If you feel strongly otherwise, i can't argue.

dagwieers commented at 2012-08-12 22:08:

There shouldn't be any bouncing back and forth if the log file contains all information anyway. If, however, you report some items missing from the log file during debugging which requires going back to the console, than that's something we may have to look into.

The reason we prefer everything logged is because for troubleshooting (after the fact) we requiring a full log file. That's what we ask people to share with the developers to understand in detail what is happening. If the output is on screen instead of the log file, it is no longer useful for post-mortem debugging.

PS Debugging does indeed require to open a second ssh session (or a second console, or a second screen session). It's not unusual (I would even say, it's common) that debugging a running process requires more than one console. Normal usage should not, so anything we could improve for normal users by adding more/better output is worth a feature-request !

cal-s commented at 2012-08-13 10:42:

OK, fair enough. I see where single-step + -d with a second log-watching session accomplishes pretty much what i'm asking about. I'll readjust myself accordingly

cheers

dagwieers commented at 2012-08-28 22:00:

Sorry for being pedantic here. I am closing this issue, if there's something in this thread we should retain to improve Relax-and-Recover, please reopen with the details ;-)

Thanks for the feedback !


[Export of Github issue for rear/rear.]