This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

thor-logs-cli

3.0.0 • Public • Published

Thor logs cli

setup and help

    npm install -g thor-logs-cli
    > thor-logs --help

example

    > thor-logs list --status=pending

outputs:

{ "pending": [], "start": [ "/logs/1.log" ], end: ["/logs/2.log"], error: [] }

or

    > thor-logs list --status=pending

outputs:

{ "pending": [] }

Combine scan and splitToFiles to create the perfect input for retransmitter:

scan will output something like

{ "MobileCoreTxns": { "pending": { "files": [ array ] }, "end": { "files": [ array ] } }, "MobileCoreAdServerLoopbacks": { etc... } }

then piping it to splitToFiles will write the following files:

MobileCoreTxns.pending.json - will contain { "files": [array] } MobileCoreTxns.end.json MobileCoreAdserverLoopbacks.pending.json etc...

it will also print all the files that it created to the console like so:

{ "files": [ "/path/to/MobileCoreTxns.pending.json", .... etc ] }

reuse list functionality

var cli = require('thor-logs-cli')

// targetPath - path to files
// extension - the base extension, e.g 1.log.active, 1.log.end, so log is the extension
// match - a string to match in all the returned files
// statusFiles - an array of statuses to include, [ 'pending', 'end'] will return { pending: [...files...], end: [...files] }
// 				if one status is specified, then the json will be { files: [] }
// includeEmptyFiles - whether to return empty log files or not
// files - an array of files in the path (e.g the result of fs.readdir call)

cli.list(targetPath, extension, match, statusFilter, includeEmptyFiles, files)

Readme

Keywords

none

Package Sidebar

Install

npm i thor-logs-cli

Weekly Downloads

74

Version

3.0.0

License

Proprietary

Last publish

Collaborators

  • kessler