Log File Types
B2C Commerce includes several different types of log files, including system logs, custom logs, import and export logs, a quota log, security logs, and batch processing logs.
To see system and custom application log files, select
. In the WebDAV Access section, click the Log files links. The Log files home page (Index of /) shows a list of log files in alphabetical order. With the right permission, you can also access the log files via a WebDAV client.There are two types of log files:
- System logging: System information logging is turned on by default. Ask Salesforce Support to change your configuration if you want to change your system's logging configuration.
- Custom logging: If you perform programmatic logging using script files, you can configure custom logging in Business Manager. Custom logging is turned on for certain types of messages. You can configure it for the other types of messages. Custom debug and info logs are disabled by default. Enabled or disable them for a specific instance at . If custom logging is disabled, no messages are logged. Custom log files begin with custom.
Log files are captured daily, stored for 30 days, and then automatically deleted. The only exception is security log files, which are automatically deleted after 90 days. You can delete log files more frequently using WebDAV. After three days, the log files are moved into a log_archive directory and compressed into gzip files. If you want to retain log files for more than their retention time, download the files and store them locally.
Allowing files to grow indefinitely can cause performance and storage issues, so files
are restricted by size. Each application server can write up to 10 MB per day into the
customdebug
, custominfo
,
customfatal
, customerror
, and
customwarn
log files. The same limit applies to the number of fatal,
error, warn, debug, and info messages that can be stored in custom named log
files
.
To ensure optimal performance and stability, delete unnecessary log files as soon as possible. Donβt store more than 100,000 files in a single folder. If there are more than 100,000 files in a single folder, files are deleted starting with the oldest first even if the files are newer than the retention period for the folder. The 100,000 limit applies to files in one specific folder, not across subfolders.
+++++++++++ Maximum log file size per day reached, logging suspended. +++++++++++
One log file exists per log level, per application server. Log levels for system and customization include:
- info
- error
- warn
- debug
- fatal
The debug
log level is always disabled on
production instances and enabled for in memory logging
on non-production
instances. In memory logging allows for the Show Request Log
feature, but
doesn't generate log files.
This table describes how different log files work.
Log file | How do I activate/configure this? | How long is it retained by time or file size? | Purpose |
---|---|---|---|
dbinit-sql | Not configurable | 30 days | SQL used during dbinit. |
deprecation | Not configurable | 30 days | Shows usage of deprecated APIs: date and time, API name, number of times used. If the file is empty, no deprecated APIs were used. |
analytics | Not configurable | 30 days | Shows any activity with B2C Commerce analytics. Review these for messages for active merchandising reports or any errors. |
api | Not configurable | 30 days | Shows API problems: area (Pipeline Dictionary, Pipeline) date and time, problem type (Error, Info, Template, Warn), path, detail type (Key, Pipelet, Pipeline, Site) and problem details. Review these for script usage and violation messages. |
customdebug |
Administration > Operations > Custom Log Settings Logger.debug in script |
10 megabytes after clicking the Log To File button Repeatable 30 days |
Review this for debug messages in custom jobs, imports, payment or code that could impact users. |
customerror |
Administration > Operations > Custom Log Settings Logger.error in script |
10 megabytes after clicking the Log To File button Repeatable 30 days |
Review this for errors in custom jobs, imports, payment or code that could impact users. |
customfatal |
Administration > Operations > Custom Log Settings Receive Email: Enter a comma-separated list of valid email addresses to enable email notification of Fatal messages. Email notifications are sent once every minute. |
10 megabytes after clicking the Log To File button Repeatable 30 days |
Review this for fatal errors in custom jobs, imports, payment or code. |
custominfo |
Administration > Operations > Custom Log Settings Logger.info in script |
10 megabytes after clicking the Log To File button Repeatable 30 days |
Review this for informational logs in in custom jobs, imports, payment or code. |
customwarn |
Administration > Operations > Custom Log Settings Logger.warn in script |
Always logged to file. Repeatable 30 days |
Review this for warn messages in custom jobs, imports, payment
or code that could impact users. |
debug | Not configurable | 30 days | Shows debug information for the entire site if the Debug flag is enabled. Use this with SOAP testing. |
error | Not configurable | 30 days | Shows errors in B2C Commerce scripts, templates, code and other areas. |
fatal | Not configurable | 30 days | Shows fatal errors in B2C Commerce scripts, templates, code and other areas. |
info | Not configurable | 30 days | Shows information logs reported on B2C Commerce scripts, templates, code and other areas. |
jobs | Not configurable | 30 days | Shows job status information: date and time, area, status (for example,
Job Manager Stopped ) on all Salesforce B2C Commerce instances and
custom jobs.
|
migration | Not configurable | 30 days | Internal migration data. |
performance | Not configurable | 30 days | Internal performance data. Not available in PIG instances. |
quota | Not configurable | 30 days |
Contains B2C Commerce quota details such as: object quotas, object relation quotas and API quotas. Select also to view status (in addition to logs). |
sql | Not configurable | 30 days | Review these if you have replication issues. |
staging | Replication info during replication. Not configurable. | 30 days | Information on B2C Commerce data and code replication processes (only on production, staging and development instances). |
sysevent | Not configurable | 30 days | Shows Appserver registration and cartridge-related logs. Shows date and time, event (for example, Active code version set to mobile). |
syslog | Not configurable | 30 days | Shows information that is related to API processing, data staging, and error handling. Also shows import and export related task info, host information, and code version activation. These logs might provide useful information when troubleshooting import and export related issues. |
console | Not configurable | 30 days |
Internal console log entries. Not available in PIG instances. The name of the console log file follows this pattern: console-hostname-appserver_id-server_name-timestamp.log In this pattern, timestamp is in yyyyMMdd format. Each entry contains: date and time, path, command (init, load, start, log), and message type (Error, Info, Severe, Warning). |
warn | 30 days | Shows lock status reports (good for job info), slot warnings and warnings for servlets. Shows date and time, WARN, area (RequestHandlerServlet, Rendering, server|application name, message details. |
Redundancy Tracking
Error and Warning messages are tracked for redundancy. If a message appears more than 10 times in 3 minutes, it is suppressed if it reappears within the next 3 minutes. When suppression begins, the following text precedes the log message text within the log entry:
The following message was generated more than 10 times within the last 180 seconds.
It will be suppressed for 180 seconds:
Tracking of repeated messages continues while the suppression is in place. After the suppression period has ended, if a new log message appears whose occurrence rate is over the 10 message per 180-second threshold, it is logged with the message described. A new suppression period begins.
Custom Named Log Files
The method public static Log getLogger( String fileNamePrefix, String category
)
enables you to obtain a log instance and write into a custom log file
through that log instance. When you call the method with the given file name prefix the
first time, B2C Commerce creates a log instance and a corresponding log file in the
usual log directory. When you call the method with the same file name prefix a second
time, B2C Commerce returns the same log instance as the first call, and all log messages
are stored in the same log file.
The log messages are written with the same pattern as used in system and custom logs, as follows:
custom - <file name prefix> - <hostname> - appserver - <creation date of the file in GMT>.log
This is an example:
custom-prefix-blade0-1-appserver-20110706.log
The file name prefix must follow these rules:
- Cannot be null or an empty string
- Must be at least three characters long
- Can contain characters a-z A-Z 0β9 '-' '_' only
- Can have up to 25 characters
- Cannot start or end with '-' or '_'
- Can only start or end with a-z A-Z 0β9
The log categories provided through Business Manager for the custom script log are also applied to this type of logger.
Quota Log
The quota log contains B2C Commerce quota details such as:
- System object (data) quota status and limits
- System API quotas status and limits
- Sandbox system's database status
- Name of deprecated methods and how often they were used within the last 24 hours
Security Logs
Security log files are located at https://<instance
name>.demandware.net/on/demandware.servlet/webdav/Sites/Securitylogs
.
Security log entries can look like this:
[2015-10-28 02:23:19.139 GMT] [DW-SEC] (User: 'username' (Sites), IP: 100.100.10.100 [LOGIN] : logged in.)The security log also includes:
- The session ID to the log entry for Business Manager logins
- Log entries for re-logins (when the Business Manager requires the password due to inactivity). These log entries log both the old and the new session ID.
Security log files are automatically deleted after 90 days. Users and clients canβt delete security logs, or turn off security logging. If you want to retain log files longer than 90 days, you must download the files and store them locally or in a dedicated storage.
Import and Export Log
You can find import and export specific information in the import and export log files. In Business Manager, navigate to Import/Export link to view log details on any activity relative to import and export. This information can provide you with critical insight into job failures or data errors. You can use this link or access the data via a WebDAV client when you perform import and export functions via Business Manager or programmatically via a pipelet. Import and export can be performed on many types of data.
. In the WebDAV Access section, click theAnalyze the data in these logs as part of daily operations and each time there is an issue with a related process such as catalog import, price book or custom feed.
The Import/Export directory has the following structure on all instances.
log/ - Log Directory
This directory contains logs for specific processes such as catalog, customer, or product batch processing, catalog import and export, inventory import, and price book import. It also contains validation logs for Price Book, Promotions, Metadata, Coupon, Inventory, and Catalog.
processlogs_archive/ Archive of logs
src/ - B2C Commerce import and export source Files
This directory contains import and export source files, which include processes such as catalog import and custom jobs for feeds such as affiliates and channel advisor.
The following is an example of a subdirectory structure for src/:
activedata/
affiliatefeeds/
archive/
catalog/
catalog_archive/
channeladvisor/
customer/
customization/
customobject/
export/
instance/
library/
operations/
order/
upload/ (Directory for upload of files before processing)
Files in the /Impex folder and files in the /Impex subfolders are automatically deleted after 30 days. The subfolders are saved.
Batch Processing Logs
You can perform batch processing on catalogs, customers, and products. Product/catalog batch processing and customer batch processing are not combined into the same interface. View the results of either from their respective Business Manager sections. For example, you can view customer batch processes by selecting
, but not by selecting .Batch processing logs can contain error reports as a result of a failed batch process. A log file can contain WARN, ERROR, or FATAL log messages. You can view the logs from the specific Batch Processing page, or from the Import/Export log directory, for example:
/Impex/log/Batch-Customer-20100128192425062.log