Command activity log

BroadSQL can keep a plain-text trail of everything that happens in a session: every command you type, and every piece of output it produces (result sets, messages, errors), can be appended to a log file as you work. This is independent from the internal application log (logs/broadsql_main_<date>.log, meant for diagnosing BroadSQL itself): this page is about the per-connection activity log meant for your own records.

One file per connection, per day

Each connection gets its own file, named:

<LogFileNamePattern>_<connection ID>_<yyyyMMdd>.log

For example, with LogFileNamePattern=broadsql, working on the WORLD and DESK connections on 2026-08-26 produces broadsql_WORLD_20260826.log and broadsql_DESK_20260826.log side by side. The connection ID is the one you used with CONNECT. The special $CDF connection is never logged, even when the log is active.

Files are written in the folder set by LogFolderName (see below), and roll over automatically to a new dated file once a file passes 2,000,000 lines; you never need to manage file size by hand.

Each line is timestamped (yyyy.MM.dd HH:mm:ss), followed by either the prompt and the command you typed, or the output BroadSQL printed back.

Turning it on

Nothing is logged by default. Two settings in conf/BroadSQL.ini, under [Log], control it:

[Log]
IsLogActivated=TRUE
LogFolderName=logs
LogFileNamePattern=broadsql
  • IsLogActivated: master switch. FALSE by default. Set it to TRUE to log every connection (except $CDF) from the moment you connect.
  • LogFolderName: where the files are written. This folder must already exist: if it doesn't, the first write fails, BroadSQL prints "Unable to write to log file" and silently turns logging off for the rest of that session (you don't need to re-enable it manually next time you start BroadSQL, since IsLogActivated in the INI is re-read at startup, but that session's activity is lost). The shipped default (C:\BroadSQL\logs) does not exist out of the box; pointing it at logs (the folder next to BroadSQL.bat/broadsql.sh) is a safer choice, since that folder is already part of the standard install layout.
  • LogFileNamePattern: the prefix used in the file name (default: CONSOLE).

Toggling it mid-session

SET TRACE; flips logging on or off for the current connection only, without touching the INI file or affecting other connections. It's a hidden command (it won't show up in HELP), meant for a quick "log this one investigation" or "stop logging this noisy import" without editing config files. Reconnecting (CONNECT) resets the setting back to whatever IsLogActivated says.