# logacious

> A node.js logger that outputs the filename and line number of where the logger is called

Latest version **0.4.1** (published 2021-01-21) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2021-01-21 |
| First published | 2017-03-06 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Nicolas Herment |
| Maintainers | duma, antucg, aolivarius, utkuufuk, nherment, piccoloaiutante, fgandellini, sergei.patiakin, helena.munoz, joao_portchain, michelemazzucco, wilk-portchain, davidchambers, sebchr |
| Keywords | logger, line, file, name |

## Links

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

## Dependencies (3)

- [ain2](https://npm.io/package/ain2.md) 2.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [moment](https://npm.io/package/moment.md) 2.24.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.4.1 (latest) — 2021-01-21
- 0.4.0 — 2019-04-22
- 0.3.0 — 2017-10-18
- 0.2.0 — 2017-05-09
- 0.1.0 — 2017-03-06

## README

# logacious

Logger with line numbers that can also send logs to syslog.

Example of the output:

```
[INFO] 2018-01-23 07:38:24.946 lib/migrations.js:25 "Migration successful"
[INFO] 2018-01-23 07:38:24.948 lib/cluster.js:59 "All initialization function successful."
[INFO] 2018-01-23 07:38:24.949 lib/cluster.js:65 "Starting workers" 3
```

## Usage

```
const logger = require('logacious')()

logger.log('foo', new Error(), object)
logger.info('foo', new Error(), object)
logger.warn('foo', new Error(), object)
logger.error('foo', new Error(), object)
```

## Environment variables

- `LOGACIOUS_SYSLOG`: set it to disable console and redirect all logs to syslog.
- `LOGACIOUS_SYSLOG_TAG`: cf. https://github.com/phuesler/ain
- `LOGACIOUS_SYSLOG_FACILITY`: cf. https://github.com/phuesler/ain
- `LOGACIOUS_SYSLOG_HOSTNAME`: cf. https://github.com/phuesler/ain
- `LOGACIOUS_SYSLOG_PORT`: cf. https://github.com/phuesler/ain

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