b2c-logs
Retrieve and search logs from B2C Commerce instances using the b2c CLI. Use this skill whenever the user needs to view server logs, search for errors, filter log entries by level or time, or monitor logs in real-time. Also use when the user reports a 500 error, broken checkout, failing job, or any server-side issue that needs log investigation — even if they just say "something's broken on the sandbox" or "check the logs".
What this skill does
# B2C Logs Skill
Use the `b2c` CLI to retrieve and monitor log files on Salesforce B2C Commerce instances. The `logs get` command is designed for agent-friendly, non-interactive log retrieval with structured JSON output.
> **Tip:** If `b2c` is not installed globally, use `npx @salesforce/b2c-cli` instead (e.g., `npx @salesforce/b2c-cli logs get`).
## Agent-Friendly Log Retrieval
The `logs get` command is optimized for coding agents:
- Exits immediately after retrieving logs (non-interactive)
- Supports `--json` for structured output
- Filters by time, level, and text search
- Auto-normalizes file paths for IDE click-to-open
## Examples
### Get Recent Logs
```bash
# 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
```
### Filter by Time
```bash
# 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"
```
### Filter by Log Level
```bash
# Only ERROR level entries
b2c logs get --level ERROR
# ERROR and FATAL entries
b2c logs get --level ERROR --level FATAL
```
### Search Text
```bash
# Search for "OrderMgr" in messages
b2c logs get --search OrderMgr
# Search for payment errors
b2c logs get --search "PaymentProcessor"
```
### Combined Filters
```bash
# 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 Available Log Files
```bash
# List all log files
b2c logs list
# List specific log types
b2c logs list --filter error --filter customerror
# JSON output
b2c logs list --json
```
### Real-Time Tailing (Human Use)
For interactive log monitoring (not for agents):
```bash
# 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+C
```
## Downloading Full Log Files
To download the complete log file, use the `file` field from the JSON output with `b2c-cli:b2c-webdav`:
```bash
b2c webdav get error-odspod-0-appserver-20260126.log --root=logs -o -
```
## JSON Output Structure
When using `--json`, `logs get` returns:
```json
{
"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 |
|-------|-------------|
| `file` | Source log file name (use with `b2c-cli:b2c-webdav` to download full file) |
| `level` | Log level: ERROR, WARN, INFO, DEBUG, FATAL, TRACE |
| `timestamp` | Entry timestamp |
| `message` | Log message (paths normalized for IDE click-to-open) |
| `raw` | Raw unprocessed log line |
## Log Types
Common log file prefixes:
| Prefix | Description |
|--------|-------------|
| `error` | System errors |
| `customerror` | Custom script errors (`Logger.error()`) |
| `warn` | Warnings |
| `debug` | Debug output (when enabled) |
| `info` | Informational messages |
| `jobs` | Job execution logs |
| `api` | API problems and violations |
| `deprecation` | Deprecated API usage |
| `quota` | Quota warnings |
## More Commands
See `b2c logs --help` for all available commands and options.
## Related Skills
- `b2c-cli:b2c-webdav` - Direct WebDAV file access for downloading full log files
- `b2c-cli:b2c-config` - Verify configuration and credentials
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.