# ptz-log

> Awesome log for javascript

Latest version **1.2.1** (published 2017-09-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install ptz-log
pnpm add ptz-log
yarn add ptz-log
bun add ptz-log
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2017-09-24 |
| First published | 2017-04-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | github.com/angeloocana |
| Maintainers | alanmarcell, angeloocana |

## Links

- npm: https://www.npmjs.com/package/ptz-log
- Repository: https://github.com/polutz/ptz-log
- Homepage: https://github.com/polutz/ptz-log#readme
- Issues: https://github.com/polutz/ptz-log/issues
- npm.io page: https://npm.io/package/ptz-log

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.18.1

## Recent versions

- 1.2.1 (latest) — 2017-09-24
- 1.2.3 (beta) — 2018-02-24
- 1.2.2 — 2017-09-26
- 0.0.9 — 2017-09-26
- 1.2.0 — 2017-09-24
- 1.1.0 — 2017-05-30
- 1.0.1 — 2017-04-13
- 1.0.0 — 2017-04-12

## README

# ptz-log

[![Build Status](https://travis-ci.org/polutz/ptz-log.svg)](https://travis-ci.org/polutz/ptz-log)
[![NPM](https://img.shields.io/npm/v/ptz-log.svg)](https://www.npmjs.com/package/ptz-log)
[![codecov.io](http://codecov.io/github/polutz/ptz-log/coverage.svg)](http://codecov.io/github/polutz/ptz-log)
[![Dependency Status](https://gemnasium.com/polutz/ptz-log.svg)](https://gemnasium.com/polutz/ptz-log)
[![bitHound Score](https://www.bithound.io/github/gotwarlost/istanbul/badges/score.svg)](https://www.bithound.io/github/polutz/ptz-log)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

Awesome log and types for javascript and typescript!

## Translations
[pt-br](https://github.com/polutz/ptz-log/blob/master/README.pt-br.md)
[en-us](https://github.com/polutz/ptz-log/blob/master/README.md)

## Use

### Install
```
    npm install --save ptz-log
```

### How to use
```javasript
    import log from 'ptz-log';

    log('hi');
    // Colors are optional
    log({ ptzColorLog: 'red' }, 'welcome',
        { ptzColorLog: 'yellow' }, 'to',
        { ptzColorLog: 'green' }, 'polutz!');
```

How to use Ilog type as dependency injection, and provide your custom logs
```javasript
    import { Ilog, log } from 'ptz-log';

    const myLog: Ilog = function (...args) {
        console.log('From my custom logging:', ...args);
    }

    class Test {
        log: Ilog;

        constructor({ log: Ilog }) {
            this.log = log;
        }

        testing() {
            log('returning true!');
            return true;
        }
    }

    const test = new Test({ log: myLog });
    test.testing();
```



## Contribute

### NPM Global packages
```
    npm install -g ts-node babel-cli
```

### Setup
```
    npm install   
```

### Test
```
    npm test
```

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