Log Files

Read, download and clear SFCC instance logs from B2C Explorer, with log names coloured by level and one-click browser access to the Logs folder

Every SFCC instance writes its logs to a WebDAV folder. Intellij SFCC lists that folder under each connection in B2C Explorer, so you can open today's error log in the editor, clear it before you reproduce a bug and open the folder in the browser, all with the connection you already use for uploads

B2C Explorer shows every connection with its ten WebDAV roots. Log names are coloured by level, and the context menu downloads, renames, compresses or clears files in place

Where the logs are

Root in B2C ExplorerWebDAV folderWhat you can do
Log Files/on/demandware.servlet/webdav/Sites/LogsRead, download, clear, rename, compress and delete
Security Log Files/on/demandware.servlet/webdav/Sites/SecuritylogsRead and download. New, Rename, Compress, Unzip, Clear and drops are not offered

Both roots sit below every connection, next to code versions and IMPEX, see WebDAV Explorer

Read a log

Open Log Files

Open the B2C Explorer tool window, expand the connection and then Log Files. Each file shows when it was last changed and its size, for example 12 minutes ago [184.6 kB]

Find the file

Names are coloured by level, so the error logs stand out. Click the tree and start typing, for example customerror, to jump to a file

Open it

Double-click the file or right-click it and choose Download and Open. The plugin downloads a copy with a cancellable progress bar and opens it in the editor

Get new lines

The copy doesn't update itself. To see what the instance wrote since, open the file again: the plugin closes the old tab and opens a fresh copy. Right-click Log Files and choose Refresh to see new files and sizes

Colours

A file's colour comes from its name, checked in this order:

Name containsColourTypical files
warnAmberwarn-*, customwarn-*
errorRederror-*, customerror-*
infoBlueinfo-*, custominfo-*
debugGreendebug-*, customdebug-*
servicePurpleservice-* logs of your service calls

Other files, such as job or quota logs, keep the default colour

Log file actions

Right-click one or more log files:

ActionWhat it does
Download and OpenDownloads a copy and opens it in the IDE. On a folder, the plugin zips it on the server, downloads and unpacks it, and shows it in your file manager
Save on Local DriveDownloads to a folder you choose
Open in BrowserOpens the file's WebDAV URL in your browser
Copy Remote PathCopies the full WebDAV URL, handy for a ticket or a teammate. With certificate authentication there is also Copy Secure Remote Path
Clear log file(s)Empties the selected .log files on the server, see Clear logs
RefreshOn a connection or folder, reloads its files

Clear logs

Clearing a log before you reproduce a problem leaves only the new lines in it, which makes them easy to read

Select the files

Select one or more .log files in Log Files. Select files only, the action isn't offered when a folder is part of the selection

Clear them

Right-click and choose Clear log file(s). The plugin replaces each file with an empty one of the same name, shows "Clearing" with the file name in the progress bar, and refreshes the folder

Reproduce and read

Run the request again, then open the log. It holds only what was written after you cleared it

Clearing can't be undone

The old lines are gone from the instance. Use Save on Local Drive first if you or your team may still need them. Security logs can't be cleared

Open logs in the browser

Open Logs in Browser opens the whole Logs folder of an instance in your browser. It is in two places:

  • Right-click a connection in B2C Explorer
  • Open the connection selector in the main toolbar and pick the connection's submenu

The browser signs in to WebDAV on its own, so it may ask for your user name and password or access key

Write lines you can find

Script code logs through dw/system/Logger. Logger.error and Logger.warn write to the customerror and customwarn files, so your own messages show up red and amber in Log Files

app_custom/cartridge/scripts/checkout/authorize.js
var Logger = require('dw/system/Logger');

function authorize(order) {
    Logger.error('Payment authorization failed for order {0}', order.orderNo);
}

Logger.info and Logger.debug write only when that level is turned on in the instance's custom log settings in Business Manager

What isn't there

  • There is no live tail. A downloaded log is a snapshot, open it again for new lines
  • Logs aren't parsed or grouped. To search across many logs, download them with Save on Local Drive and use Find in Files
  • The B2C Sync Log tool window shows the plugin's own upload and deploy output, not instance logs, see Upload & Auto Upload

For parsed logs grouped into issues, the VS Code extension has Log Center

Troubleshooting

SymptomWhat to do
Log Files looks oldRight-click it and choose Refresh. The tree doesn't reload on its own
An open log has no new linesOpen the file again from B2C Explorer. Each open downloads a fresh copy
Clear log file(s) is missingSelect only .log files in Log Files. It isn't offered for folders, other files or Security Log Files
A WebDAV error with a status codeThe file no longer exists, or the account has no WebDAV access to the folder. Refresh the folder and check the access keys in Credentials
Your Logger.info lines never appearTurn on that level for the category in the instance's custom log settings
"Sandbox is down"Start the sandbox from On-Demand Sandboxes, then refresh the connection

On this page