cortex log

View and manage Cortex logging output. The logging system writes JSONLines to a rotating log file with configurable log levels.

Usage

cortex log <subcommand> [options]

Subcommands

SubcommandDescription
showDisplay recent log entries (latest 100 by default)
tailStream new log entries in real time
clearClear/truncate the log file
pathPrint the path to the current log file
set-levelSet the log level for the current session
statusShow current logging configuration

Options

OptionSubcommandDescription
--limit, -nshowNumber of log entries to display (default: 100)
--level, -lshow, tailFilter by log level (trace, debug, info, warn, error)

Log Levels

LevelDescription
traceVerbose diagnostic output
debugDebug-level information
infoGeneral operational messages
warnWarning conditions
errorError conditions
silentSuppress all log output

Configuration

The logging system is configured in ~/.cortex/config.json:

{
  "logging": {
    "filePath": "~/.cortex/cortex.log",
    "level": "info"
  }
}

Environment variable override: CORTEX_LOG_LEVEL

Examples

# View recent logs
cortex log show

# View last 100 log entries
cortex log show -n 100

# Filter by error level
cortex log show --level error

# Stream logs in real time
cortex log tail

# Check current configuration
cortex log status