# logsplus

> An NPM package to improve logging.

Latest version **3.0.0** (published 2021-07-02) · ISC license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2021-07-02 |
| First published | 2021-07-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Commandcracker8 |
| Maintainers | commandcracker8 |
| Keywords | logs, better, commandcracker8 |

## Links

- npm: https://www.npmjs.com/package/logsplus
- Repository: https://github.com/CommandCracker8/LogsPlus
- Issues: https://github.com/CommandCracker8/LogsPlus/issues
- npm.io page: https://npm.io/package/logsplus

## 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.0.0 (latest) — 2021-07-02
- 2.0.2 — 2021-07-02
- 2.0.0 — 2021-07-02
- 1.0.0 — 2021-07-02

## README

# LogsPlus
A module to help you log better in your Javascript and TypeScript projects.

### Installing the module
 Run `npm install logsplus` in your chosen command prompt.

### Importing the module

To import the module in Javascript:
```javascript
const Logger = require('logsplus')
```

And in TypeScript:
```typescript
import Logger from 'logsplus'
```
### Using the module
```javascript
// To do a general log
Logger.log("This is a normal log!")

// To send an info log
Logger.info("This is an informational log.")

// To send a warning
Logger.warn("This is a warning.")

// To send an error
Logger.error("This is an error, you should check this out!")
```
The same goes for TypeScript, remember to replace "Logger" with whatever you initialised the module with.
<br />
You can also make the default console use this module so you don't have to import the module in every file:

```javascript
console = Logger.linkConsole(console)
```
Note: This line of code only needs to go in your main file, because the console object syncs between files.
<br />
And then it's as simple as doing what you done before, just with the default console instead!

```javascript
// To do a general log
console.log("This is a normal log!")

// To send an info log
console.info("This is an informational log.")

// To send a warning
console.warn("This is a warning.")

// To send an error
console.error("This is an error, you should check this out!")
```

Also, to get any of the original console functions, just do, for example, `console.default.log`!

### Support & Feature Requests
This package is looking for feedback and ideas to help cover more use cases. If you have any ideas feel free to share them within the "suggestions" channel in the [Commandcracker8's Development](https://discord.gg/BynpBR4NAe) Discord server. You can also use the [Issues Page](https://github.com/CommandCracker8/LogsPlus/issues) of the [Github](https://github.com/) repo for this package.

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