JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 750
  • Score
    100M100P100Q103251F
  • License MIT

Collect all the logs from all docker containers

Package Exports

  • docker-loghose

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (docker-loghose) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

docker-loghose

Collect all the logs from all docker containers

Install

As a command line tool:

npm install docker-loghose -g

Embedded usage

npm install docker-loghose --save

Embedded Usage

var loghose = require('loghose')
var opts = {
  json: false, // parse the lines that are coming as JSON
  docker: null // here goes options for Dockerode
}
loghose().pipe(through.obj(function(chunk, enc, cb) {
  this.push(JSON.stringify(chunk))
  this.push('\n')
  cb()
})).pipe(process.stdout)

Command Line Usage

docker-loghose [--json]

Docker Usage

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock matteocollina/docker-loghose

Data format

{
  v: 0,
  id: "3324acd73ad5ed7aa5d35675fd3e5f34d8a3ee4ea77c19239cfa113e47d0ddce",
  image: "myimage:latest",
  line: "This is a log line" // this will be an object if opts.jon is true
}

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT