# tir

> Logger

Latest version **1.0.1** (published 2017-05-07) · 0 weekly downloads

## Install

```sh
npm install tir
pnpm add tir
yarn add tir
bun add tir
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-05-07 |
| First published | 2016-05-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.x |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexander Abashkin |
| Maintainers | monolithed |
| Keywords | log, logger, notifier, winston |

## Links

- npm: https://www.npmjs.com/package/tir
- Repository: https://github.com/monolithed/tir
- Homepage: https://github.com/monolithed/tir#readme
- Issues: https://github.com/monolithed/tir/issues
- npm.io page: https://npm.io/package/tir

## Dependencies (2)

- [winston](https://npm.io/package/winston.md) ^2.3.1
- [@types/winston](https://npm.io/package/@types/winston.md) ^2.3.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-05-07
- 1.0.0 — 2017-05-07
- 0.0.2 — 2016-05-27
- 0.0.1 — 2016-05-27

## README

# Tir

> It's just a wrapper with colorization around [Winston](https://www.npmjs.com/package/winston).


### Installation

```
npm install tir
```

### Synopsis

```
Tir.<info | warn | error | log>
```

![Example](./files/preview.png)


### Usage

```ts
import { Log } from 'tir';

Log.info('message %j', { x: 1 });
```

The first argument is a string containing zero or more placeholder tokens. Each placeholder token is replaced with the converted value from the corresponding argument.<br />
<br />
Supported placeholders are:<br />

* **%s** - String.
* **%d** - Number (integer or floating point value).
* **%i** - Integer.
* **%f** - Floating point value.
* **%j** - JSON. Replaced with the string '[Circular]' if the argument contains circular references.
* **%%** - single percent sign ('%'). This does not consume an argument.

#### .info

*Information message*

```js
Log.info('Information %s', 'message');
```

#### .warn

*Warning message*

```js
Log.warn('Warning %s', 'message');
```

#### .error

*Error message*

```js
Log.error('Error %s', 'message');
```

#### .log

*Universal method*

```js
import { Log as Tir } from 'tir';

Tir.log('info', 'Information %s', 'message');
```

### License

The library is licensed under the MIT (LICENSE.txt) license.

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