# logger-to-file

> Módulo para escrever log em arquivo

Latest version **3.1.6** (published 2018-10-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install logger-to-file
pnpm add logger-to-file
yarn add logger-to-file
bun add logger-to-file
```

## 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 | 3.1.6 |
| Published | 2018-10-19 |
| First published | 2018-09-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Washington |
| Maintainers | brenoviewup, igor-vwp, washington-freitas |
| Keywords | log |

## Links

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

## Dependencies (5)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [path](https://npm.io/package/path.md) ^0.12.7
- [crypto](https://npm.io/package/crypto.md) ^1.0.1
- [moment](https://npm.io/package/moment.md) ^2.22.2
- [email-module](https://npm.io/package/email-module.md) *1.1.5

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

- 3.1.6 (latest) — 2018-10-19
- 3.1.5 — 2018-10-18
- 2.1.5 — 2018-10-17
- 1.1.5 — 2018-10-04
- 1.1.4 — 2018-10-04
- 1.1.3 — 2018-09-29
- 1.1.2 — 2018-09-28
- 1.1.1 — 2018-09-28
- 1.1.0 — 2018-09-28
- 1.0.3 — 2018-09-28
- 1.0.2 — 2018-09-28
- 1.0.1 — 2018-09-28
- 1.0.0 — 2018-09-28

## README

# Logger to file 

Este módulo tem como finalidade  escrever os registro de log de um servidor em arquivo acompanhado de um console.log.

## Instalação

npm i logger-to-file

### Uso

importe o logger-to-file no projeto da seguinte forma :

import Logger from 'logger-to-file';


Logger.getInstance().register("string") <- Adiciona no cache e emite um console.log->

Logger.getInstance().register("erro algum erro aconteceu") <-  emite um console.error->

Logger.getInstance().flush() <- Cria um arquivo e escreve Tudo que estiver em cache nomeando o arquivo com a data atual  no formato ISO (DD_MM_YYYY) ->

Logger.getInstance().() <- Cria um arquivo e escreve Tudo que estiver em cache nomeando o arquivo com a data atual  no formato ISO (DD_MM_YYYY) ->

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