I just coded a shared logger component - using lambda layers, from scratch, and it worked the first try - on my local and on AWS. Those startup idiots who all rejected me have no idea what they missed out on :P
However it also revealed the limitations of console.log - which
AWS seems to recommend.
Code:
2019-01-10T21:27:03.729Z 786d4548-151e-11e9-91cf-7940ae1c694c { filename: '/var/task/getuser.js',
level: 'debug',
msg: { dpUser: { Item: [Object] } } }
END RequestId: 786d4548-151e-11e9-91cf-7940ae1c694c
Yeah [Object] isn't really gonna do. So I found
this blog which says just start with JSON logging and use whatever you normally use (bunyan for us). So I have to throw out my beautiful hole in one logger before it even gets off the ground.