# @mangar2/errorlog

> Prints a error string or an error object to console.error

Latest version **1.0.3** (published 2020-12-10) · LGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @mangar2/errorlog
pnpm add @mangar2/errorlog
yarn add @mangar2/errorlog
bun add @mangar2/errorlog
```

## 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.3 |
| Published | 2020-12-10 |
| First published | 2019-09-28 |
| Weekly downloads | 0 |
| License | LGPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Volker Böhm |
| Maintainers | mangar2 |
| Keywords | error, log |

## Links

- npm: https://www.npmjs.com/package/@mangar2/errorlog
- Repository: https://github.com/Mangar2/yaha/tree/master/node_modules/@mangar2/errorlog
- Homepage: https://github.com/Mangar2/yaha.git
- npm.io page: https://npm.io/package/@mangar2/errorlog

## 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.3 (latest) — 2020-12-10
- 1.0.2 — 2020-01-12
- 1.0.1 — 2019-10-15
- 1.0.0 — 2019-09-28

## README

<!-- This file is generated by jsmddoc version 0.1 -->

# Abstract

Errorlog is a small helper to log error messages ( usually used in catch blocks )

Example

```shell
errorLog('hello world')
errorLog(new Error('hello world'), false)
```

## Contents

- [Meta](#Meta)
- [Global Functions](#Global-functions)
  - [errorLog](#errorLog)

## Meta

| | |
| --- | --- |
| **File** | errorlog.js |
| **Abstract** | Errorlog is a small helper to log error messages ( usually used in catch blocks ) |
| **Author** | Volker Böhm |
| **Copyright** | Copyright ( c ) 2020 Volker Böhm |
| **License** | This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 . It is furnished "as is" , without any support , and with no warranty , express or implied , as to its usefulness for any purpose . |

## Global functions

### errorLog

`readonly errorLog (error, debug)`

logs an error

- If error is a string , it just logs the string .
- If error is an Error object it logs the message and the stack trace ( if the debug flag is true ) .

#### errorLog Parameters

| Name | Type | Attribute | Default | Description |
| ---------- | ------------ | ------------ | ------------ | ----------------- |
| `error` | `Error, string` |  |  | error object or error string | |
| `debug` | `boolean` | optional | true | true to print the full stack trace | |

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