Loading...
Loading...
Retrieve or monitor logs from B2C Commerce instances with the b2c cli. Always reference when using the CLI to fetch logs, search log entries, filter by level/time, or tail logs in real-time. Also use when a user reports errors, broken functionality, or issues with controllers, script APIs, custom API backends, jobs, or other SFCC server-side components.
npx skill4agent add salesforcecommercecloud/b2c-developer-tooling b2c-logsb2clogs getTip: Ifis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli logs get
logs get--json# Get last 20 entries from error and customerror logs (default)
b2c logs get
# Get last 50 entries
b2c logs get --count 50
# JSON output for programmatic parsing
b2c logs get --json# Entries from the last 5 minutes
b2c logs get --since 5m
# Entries from the last 1 hour
b2c logs get --since 1h
# Entries from the last 2 days
b2c logs get --since 2d
# Entries after a specific time (ISO 8601)
b2c logs get --since "2026-01-25T10:00:00"# Only ERROR level entries
b2c logs get --level ERROR
# ERROR and FATAL entries
b2c logs get --level ERROR --level FATAL# Search for "OrderMgr" in messages
b2c logs get --search OrderMgr
# Search for payment errors
b2c logs get --search "PaymentProcessor"# Recent errors containing "PaymentProcessor"
b2c logs get --since 1h --level ERROR --search "PaymentProcessor" --json
# Last hour of errors and fatals from specific log types
b2c logs get --filter error --filter warn --since 1h --level ERROR --level FATAL# List all log files
b2c logs list
# List specific log types
b2c logs list --filter error --filter customerror
# JSON output
b2c logs list --json# Tail error and customerror logs
b2c logs tail
# Tail specific log types
b2c logs tail --filter debug --filter error
# Tail only ERROR and FATAL level entries
b2c logs tail --level ERROR --level FATAL
# Tail with text search
b2c logs tail --search "PaymentProcessor"
# Combined filtering
b2c logs tail --filter customerror --level ERROR --search "OrderMgr"
# Stop with Ctrl+Cfileb2c-cli:b2c-webdavb2c webdav get error-odspod-0-appserver-20260126.log --root=logs -o ---jsonlogs get{
"count": 1,
"entries": [
{
"file": "error-odspod-0-appserver-20260126.log",
"timestamp": "2026-01-26 04:38:03.022 GMT",
"level": "ERROR",
"message": "PipelineCallServlet|156679877|Sites-Site|...",
"raw": "[2026-01-26 04:38:03.022 GMT] ERROR PipelineCallServlet|..."
}
]
}| Field | Description |
|---|---|
| Source log file name (use with |
| Log level: ERROR, WARN, INFO, DEBUG, FATAL, TRACE |
| Entry timestamp |
| Log message (paths normalized for IDE click-to-open) |
| Raw unprocessed log line |
| Prefix | Description |
|---|---|
| System errors |
| Custom script errors ( |
| Warnings |
| Debug output (when enabled) |
| Informational messages |
| Job execution logs |
| API problems and violations |
| Deprecated API usage |
| Quota warnings |
b2c logs --helpb2c-cli:b2c-webdavb2c-cli:b2c-config