Retrieve log files from Demandware server
> Retrieve log files from Demandware sandbox
``sh`
:; npm install dwlogs
`sh`
:; dwlogs --type error --day 'June 16, 2015'
To have the logs be more usable, you can pipe them into less, tail or any stdout processing tool you have
`sh`
:; dwlogs | less
:; dwlogs | tail -n 100
If a type option is not present, it will list all the log files instead.
- hostname: sandbox URL (without the https://)username
- and password: credentials to log into your sandbox (should have admin privileges)type
- || t: type of logs to retrieve. This option is required in order to see the content of a log file.day
- || d: day of log to retrieve from, default to today. This can be any string that notify a date object. See Date/dateStringlist
- || l: List all log files. They are grouped by name, then sorted by date last modified.
file instead. For example:`js
{
"hostname": "example.demandware.net",
"username": "user",
"password": "password"
}
`Command line options will always override the options delcared in the config file.
Note: the
dw.json file should be .gitignore`d and not committed to source code.