Logging Output (Debugging with ROCGDB)

Previous: Shell Commands, Up: Invocation [Contents][Index]

### 2.4 Logging Output

You may want to save the output of ROCGDB commands to a file. There are several commands to control ROCGDB’s logging.

`set logging on`

  Enable logging.

`set logging off`

  Disable logging.

`set logging file file`

  Change the name of the current logfile. The default logfile is `gdb.txt`.

`set logging overwrite [on|off]`

  By default, ROCGDB will append to the logfile. Set `overwrite` if you want `set logging on` to overwrite the logfile instead.

`set logging redirect [on|off]`

  By default, ROCGDB output will go to both the terminal and the logfile. Set `redirect` if you want output to go only to the log file.

`set logging debugredirect [on|off]`

  By default, ROCGDB debug output will go to both the terminal and the logfile. Set `debugredirect` if you want debug output to go only to the log file.

`show logging`

  Show the current values of the logging settings.

You can also redirect the output of a ROCGDB command to a shell command. See pipe.