# thor-logs-cli

> a cli tool for thor logs

Latest version **3.0.0** (published 2014-04-30) · Proprietary license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install thor-logs-cli
pnpm add thor-logs-cli
yarn add thor-logs-cli
bun add thor-logs-cli
```

Provides the commands `thorlogs`, `thor-logs`, `thor-logs-cli`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2014-04-30 |
| First published | 2014-03-27 |
| Weekly downloads | 0 |
| License | Proprietary |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yaniv Kessler |
| Maintainers | yaniv |

## Links

- npm: https://www.npmjs.com/package/thor-logs-cli
- Repository: https://github.com/ironSource/thor-logs-tool
- Issues: https://github.com/ironSource/thor-logs-tool/issues
- npm.io page: https://npm.io/package/thor-logs-cli

## Dependencies (2)

- [rc](https://npm.io/package/rc.md) ~0.3.4
- [nomnom](https://npm.io/package/nomnom.md) ~1.6.2

## Recent versions

- 3.0.0 (latest) — 2014-04-30
- 2.3.7 — 2014-04-30
- 2.3.6 — 2014-04-30
- 2.3.5 — 2014-04-30
- 2.3.4 — 2014-04-28
- 2.3.2 — 2014-04-19
- 2.1.0 — 2014-04-09
- 2.0.3 — 2014-04-07
- 2.0.2 — 2014-04-07
- 2.0.1 — 2014-04-06
- 1.0.1 — 2014-03-31
- 1.0.0 — 2014-03-31
- 0.0.3 — 2014-03-27
- 0.0.2 — 2014-03-27

## README

# 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)

```

---
_Source: https://npm.io/package/thor-logs-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
