0.0.6 • Published 11 years ago

bmtail v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
11 years ago

bmtail

An handy tool that can be used to "tail" logs stored in a mongodb collection. This tool supports logs stored using node-bunyan (https://github.com/trentm/node-bunyan) with mongo-stream (https://github.com/Raynos/mongo-stream).

NPM

Tested on OS X and Ubuntu.

Install

npm install bmtail bunyan -g

Usage

Here it is the help message

Usage: index bmtail [-m CONNECTION_STRING] [| bunyan]
	 Press 'p' to pause and resume the stream.
	 Press CTRL + c or 'q' to quit.

  Options:

    -h, --help                                 output usage information
    -V, --version                              output the version number
    -m, --mongo-url <CONNECTION_STRING>        mongodb connection string [mongodb://localhost/logger]
    -s, --source-collection <COLLECTION_NAME>  name of the collection where the log is stored [log]
    -n, --lines <NUM_LINES>                    lines of log to display at start [30]
    -r, --refreshPeriod <ms>                   number of milliseconds to wait between fetching new records [500]

Since the goal of this module is to print bunyan log, it makes sense to run the tool piped with bunyan itself:

bmtail -m CONNECTION_STRING | bunyan

To DO

  • Mocha tests
  • Add some parameters like refresh period (now 500 ms), the lines of log to show at start time (now 30) done
  • Add possibility to pause/continue the log stream done
  • Add some parameters to filter output

LICENSE - "MIT License"

Copyright (c) 2014 Matteo Murgida

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago