# @machinomy/logger

> Machinomy Logger

Latest version **0.2.5** (published 2019-01-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @machinomy/logger
pnpm add @machinomy/logger
yarn add @machinomy/logger
bun add @machinomy/logger
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2019-01-14 |
| First published | 2018-07-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 166 |
| Maintainers | ariaskov, ukstv |

## Links

- npm: https://www.npmjs.com/package/@machinomy/logger
- Repository: https://github.com/machinomy/machinomy
- Homepage: https://github.com/machinomy/machinomy#readme
- Issues: https://github.com/machinomy/machinomy/issues
- npm.io page: https://npm.io/package/@machinomy/logger

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [logdna](https://npm.io/package/logdna.md) ^2.0.4
- [@types/debug](https://npm.io/package/@types/debug.md) ^0.0.30

## Recent versions

- 0.2.5 (latest) — 2019-01-14
- 0.2.3 — 2018-09-24
- 0.2.2 — 2018-09-24
- 0.2.1 — 2018-09-21
- 0.2.0 — 2018-08-10
- 0.1.0 — 2018-07-29
- 0.0.5 — 2018-07-20
- 0.0.4 — 2018-07-20
- 0.0.3 — 2018-07-09
- 0.0.2 — 2018-07-05
- 0.0.1 — 2018-07-05

## README

# Machinomy Logger

[Machinomy](https://github.com/machinomy/machinomy/tree/master/packages/machinomy) logger. Works in browser and Node.

### Basic usage

```typescript
import Logger from '@machinomy/logger'

const LOG = new Logger('your-namespace')

LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')
```

### Usage with LogDNA

```typescript
import Logger from '@machinomy/logger'

const LOG = new Logger(
    'your-namespace',
    'LogDNA-Ingestion-Key-As-String',    // Ingestion Key from "API Keys" section of LogDNA website
    { hostname: 'another-host' }         // Any LogDNA for Node.js constructor options
 )

LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')
```

For more LogDNA options see [LogDNA for Node.js](https://github.com/logdna/nodejs#options)


**DO NOT FORGET TO DEFINE "DEBUG=*" ENV VARIABLE!**

**IF YOU USE @machinomy/logger AT MULTIPLE LAYERS OF YOUR SOFTWARE - DO NOT FORGET TO DEFINE "DEBUG_DEPTH=10" ENV VARIABLE!**


Web site: [machinomy.com](http://machinomy.com).
Twitter: [@machinomy](http://twitter.com/machinomy).
Support/Discussion: [Gitter](https://gitter.im/machinomy/machinomy).

:exclamation:
Please, pay attention, this package is the part of [Machinomy Lerna Monorepo](https://github.com/machinomy/machinomy) and it's intended to use with other monorepo's packages. 

:no_entry: You **should not** git clone this repository alone

:white_check_mark: You **should** git clone the main repository via
```
git clone https://github.com/machinomy/machinomy.git
or 
git clone git@github.com:machinomy/machinomy.git
```

**For documentation, usage and contributing please see [Machinomy Monorepo](https://github.com/machinomy/machinomy).**

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