- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
Variable | Description | Example | |
---|---|---|---|
*monitorID* | The ID of the monitor | 0011223344 | |
*monitorURL* | The URL of the monitor | https://uptimerobot.com/dashboard.php#0011223344 | |
*monitorFriendlyName* | The friendly name of the monitor | My Site Monitor | |
*alertType* | Numeric value representing alert | 1 -> down; 2 -> up; 3 -> SSL expiry notification | |
*alertTypeFriendlyName* | Human readbable description of alert | Down or Up | |
*alertDetails* | Supplemental information about the alert | The service on port 22 is not responsive | |
*alertDuration* | Amount of time the alert was active for (in seconds) | 42 | |
*alertDateTime* | Seconds since Unix epoch (Jan 1 1970 UTC) | 5843285963 |
const logform = require('logform'); | |
const tripleBeam = require('triple-beam'); | |
const winston = require('winston'); | |
const errorHunter = logform.format(info => { | |
if (info.error) return info; | |
const splat = info[tripleBeam.SPLAT] || []; | |
info.error = splat.find(obj => obj instanceof Error); |
const errorPrinter = logform.format(info => { | |
if (!info.error) return info; | |
// Handle case where Error has no stack. | |
const errorMsg = info.error.stack || info.error.toString(); | |
info.message += `\n${errorMsg}`; | |
return info; | |
}); |
const errorHunter = logform.format(info => { | |
if (info.error) return info; | |
const splat = info[tripleBeam.SPLAT] || []; | |
info.error = splat.find(obj => obj instanceof Error); | |
return info; | |
}); |
### Keybase proof | |
I hereby claim: | |
* I am stieg on github. | |
* I am stieg (https://keybase.io/stieg) on keybase. | |
* I have a public key whose fingerprint is 2397 94BA C38A C92C 23DD 6C4F CC52 C03B 23D1 FAEE | |
To claim this, I am signing this object: |