Intellij SFCC lists each instance's WebDAV log folders under its connection in B2C Explorer, so you can read, download and clear logs with the connection you already use for uploads
Where the logs are
| Root in B2C Explorer | WebDAV folder | What you can do |
|---|---|---|
| Log Files | /on/demandware.servlet/webdav/Sites/Logs | Read, download, clear, rename, compress and delete |
| Security Log Files | /on/demandware.servlet/webdav/Sites/Securitylogs | Read and download. New, Rename, Compress, Unzip, Clear and drops are not offered |
For the other root folders, 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], and its event count once the Log Center parsed it
Find the file
Files are grouped by type, newest first, and each group says how many files it holds, when the latest changed and their size. The buttons on the Log Files row switch to List or Group by Prefix, and Expand All and Collapse All open or close the groups. Right-click Log Files for the same choices under Group Log Files
Names are coloured by level, see Colours. Click the tree and type, for example customerror, to jump to a file
Open it
Double-click the file or choose Download and Open to download a copy and open it in the editor. It opens with level colours, folds and links to your code, see Logs in the Editor
Get new lines
The copy doesn't update itself. Open the file again for a fresh copy, the old tab closes, or use Tail in Log Center to follow new lines. To see new files and sizes, right-click Log Files and choose Refresh
Colours
A file's colour comes from its name, checked in this order:
| Name contains | Colour | Typical files |
|---|---|---|
warn | Amber | warn-*, customwarn-* |
error | Red | error-*, customerror-* |
info | Blue | info-*, custominfo-* |
debug | Green | debug-*, customdebug-* |
service | Purple | service-* 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:
| Action | What it does |
|---|---|
| Download and Open | Downloads 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 Drive | Downloads to a folder you choose |
| Open in Browser | Opens the file's WebDAV URL in your browser |
| Copy Remote Path | Copies the full WebDAV URL. 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 |
| Open in Log Center | Parses the files in the Log Center and shows their events |
| Tail in Log Center | Parses the files, then follows their new lines in the Log Center. Archives are left out |
| Refresh | On a connection or folder, reloads its files |
Clear logs
Clear a log before you reproduce a problem so it holds only the new lines
Select the files
Select one or more .log files in Log Files, no folders
Clear them
Right-click and choose Clear log file(s). Each file is replaced with an empty one and the folder refreshes
Reproduce and read
Run the request again, then open the log
Clearing can't be undone
The old lines are gone from the instance. Use Save on Local Drive first if you may still need them
Open logs in the browser
Open Logs in Browser opens the instance's Logs folder 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 may ask for your user name and password or access key
Write lines you can find
Logger.error and Logger.warn from dw/system/Logger write to the customerror and customwarn files, shown red and amber in Log Files
var Logger = require('dw/system/Logger');
function authorize(order) {
Logger.error('Payment authorization failed for order {0}', order.orderNo);
}Parse, search and tail logs
A file opened from Log Files is a plain copy. To group repeated errors into issues, search many logs at once or follow new lines, use the Log Center
- Open in Log Center on log files parses them and shows their events
- Tail in Log Center parses them, then follows their new lines
- B2C Sync shows the plugin's own upload and deploy output, not instance logs, see Upload & Auto Upload
Troubleshooting
| Symptom | What to do |
|---|---|
| Clear log file(s) is missing | Select only .log files in Log Files. It isn't offered for folders, other files or Security Log Files |
| A WebDAV error with a status code | The 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 or Logger.debug lines never appear | Turn on that level for the category in the instance's custom log settings in Business Manager |
| "Sandbox is down" | Start the sandbox from On-Demand Sandboxes, then refresh the connection |