{"repo":"Coggle/s3-streamlogger","free":true,"listed":false,"github":"https://github.com/Coggle/s3-streamlogger","clone":"git clone https://github.com/Coggle/s3-streamlogger.git","description":"Node.js stream for logging to s3 with rotated object names. Usable as a winston-file stream.","language":"JavaScript","stars":80,"topics":["nodejs","s3","aws","javascript","logging"],"license":"ISC","category":"analytics","readme_excerpt":"s3-streamlogger A Writable Stream object that uploads to s3 objects, periodically rotating to a new object name. See also tails3 for a script to tail the log files produced by s3-streamlogger. Installation Basic Usage Use with Winston: Log to S3 Define subfolder Assign tags Add hostname information for tails3 tails3 expects messages to be logged as json (the default for the file transport), with hostname and (for critical errors), stack properties to each log object, in addition to the standard timestamp, level and message properties. You can provide these using the third \"metadata\" option to winston's log method: Handling logging errors When there is an error writing to s3, the stream emits an 'error' event with details. You should take care not to log these errors back to the same stream (as that is likely to cause infinite recursion). Instead log them to the console, to a file, or to SNS using winston-sns. Note that these errors will result in uncaught exceptions unless you have an error event handler registered, for example: When using s3-streamlogger with the Winston Stream transport, the Stream transport attaches its own error handler to the stream, so you do not need your own, however it will re-emit the errors on itself which must be handled instead: Options bucket (required) Name of the S3 bucket to upload data to. Must exist. Can also be provided as the environment variable BUCKET NAME . folder An optional folder to stream log files to. Takes a path string, eg: \"my/","default_branch":null,"files":null,"tree":[],"storefront":"/r/Coggle","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Coggle/s3-streamlogger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}