Skip to content

Instantly share code, notes, and snippets.

@justinpage
Created September 17, 2021 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinpage/26c2986bcfd4060c997c45c3318e2107 to your computer and use it in GitHub Desktop.
Save justinpage/26c2986bcfd4060c997c45c3318e2107 to your computer and use it in GitHub Desktop.
const logger = require('pino')({
timestamp: () => `,"time":"${new Date().toISOString()}"`
})
const LIMIT = 5
let c = {uuid: '6d20a81a-28f9-4fb7-8ee8-2f742bc6d9a2'}
let e = {msg: `Timeout: failed to get response in ${LIMIT} seconds`}
logger.error({cxt: c, err: e}, 'getImages: Failed to get images from API')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment