Project

General

Profile

« Previous | Next » 

Revision 9224

lib/sh/util.sh: disable_logging(): use echo_eval instead of plain eval so the disabling of logging is nevertheless itself logged

View differences:

lib/sh/util.sh
151 151

  
152 152
log_fd=2 # stderr
153 153

  
154
disable_logging() { eval exec "$log_fd>/dev/null"; }
155

  
156 154
if test "$explicit_errors_only"; then verbosity=0; fi # hide startup logging
157 155

  
158 156
# set verbosity
......
222 220

  
223 221
## external commands
224 222

  
223
disable_logging() { echo_eval exec "$log_fd>/dev/null"; }
224

  
225 225
function command() # usage: [cmd_log_fd=|1|2|#] command extern_cmd...
226 226
# to view only explicitly-displayed errors: explicit_errors_only=1 script...
227 227
{

Also available in: Unified diff