Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

totoro-log-analyse

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

totoro-log-analyse

Totoro log analyse.

latest
npmnpm
Version
2.0.0
Version published
Maintainers
2
Created
Source

totoro

tla

Totoro log analyse.

Latest stable version:v2.0.0

1. Installation

Install from npm

$ npm install totoro-log-analyse -g

If it not works, you may need add sudo before the command, as follows.

Install from github

To get the latest function (may not be stable)

$ git clone git@github.com:totorojs/totoro-log-analyse.git
$ cd totoro-log-analyse
$ npm install -g

2. Set Mongodb

  • tla use mongodb to store log message, thus, install it first.

  • Start mongod.

    $ mongod
    
  • Connect to mongod and create a database named totoro.

    $ mongo
    > use totoro
    
  • Add a user which has readWrite privileges to it.

    > db.addUser({
        user: '{{userName}}',
        pwd: '{{password}}',
        roles: [ 'readWrite' ]
      })
    
    // If db.addUser() dose't work, you may use db.createUser()
    
  • Restart mongod with auth option .

    $ mongod --auth
    

3. Cli Options

-D, --dir

Specifies log directory.

Default: 'totoro-server-logs/'

-S, --start [s]

Start date of log file to process.

Let's assume today is 2014-02-14, and there are some log files as bellow:

totoro-server-logs/
  20140201.log
  20140202.log
  ...
  20140213.log
  20140214.log

If specifies --start=20140201, tla will process log files created since 2014-02-01.

If not specifies this option, will only process log files created today and later.

NOTE: tla will handle repeated log message and watch increased log message automatically.

Default: today

-s, --db

Db server.

Default: 'localhost:27017/totoro'

-u, --user

Db user name that is given readWrite privileges.

-w, --pwd

Db password.

-H, --host

HTTP server host.

tla supplies some HTTP api to query log info. After run tla, open {{host}}:{{port}} in browser, you will see all APIs.

Default: IP of your computer.

-P, --port

HTTP server port.

Default: 9997

-d, --debug

Show debug log.

-v, --version

Output the version number.

-h, --help

Output usage information.

Keywords

totoro

FAQs

Package last updated on 05 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts