LOG

Enable/Disable logging and set log file

LOG

Copy the console output to a file, or stop doing so.

log [File=<name>] [Append=yes|no] [Quiet=yes|no] [on|off]

  • No argument: print Logging to file <name>: enabled or disabled. The default file is bcm.log in syncd’s working directory.

  • on, or options alone: open the file (appending by default) and start logging. Unless Quiet=yes, it prints File logging started to <name> (or continued).

  • off: stop logging and print File logging to <name> stopped., or fail with File logging is not active..

The file is written as root inside the syncd container; use a directory that exists there, such as /tmp. Does not affect the switch.

Hardware-validated

drivshell> log file=/tmp/bcm-diag.log append=no
File logging started to /tmp/bcm-diag.log
log off

Stop file logging.

Hardware-validated

drivshell> log off
File logging to /tmp/bcm-diag.log stopped.

Built-in help

Parameters: [file=<filename>] [append=<yes|no>]
    [quiet=<yes|no>] [on|off]
    Set a logfile and/or turn on or off logging. When a file is set
    for logging an implicit "log on" is assumed.

Further reading

SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), BCM_SDK命令, bcm cmd, bcm 使用技巧, OF-DPA with ONL Cheat Sheet.