# @daangamesdg/logger

> A simple logger you can use to log stuff in the console

Latest version **1.1.0** (published 2021-08-22) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @daangamesdg/logger
pnpm add @daangamesdg/logger
yarn add @daangamesdg/logger
bun add @daangamesdg/logger
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-08-22 |
| First published | 2021-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | DaanGamesDG |
| Maintainers | daangamesdg |

## Links

- npm: https://www.npmjs.com/package/@daangamesdg/logger
- Repository: https://github.com/DaanGamesDG/logger
- Homepage: https://github.com/DaanGamesDG/logger#readme
- npm.io page: https://npm.io/package/@daangamesdg/logger

## Dependencies (1)

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

## Recent versions

- 1.1.0 (latest) — 2021-08-22
- 1.0.9 — 2021-08-22
- 1.0.8 — 2021-08-13
- 1.0.7 — 2021-08-13
- 1.0.6 — 2021-08-12
- 1.0.5 — 2021-08-12
- 1.0.4 — 2021-08-12
- 1.0.3 — 2021-08-12
- 1.0.2 — 2021-08-12
- 1.0.1 — 2021-08-12

## README

<h1 align="center">@daangamesdg/logger</h1>

> A simple logger you can use to log stuff in the console

## Install

```sh
yarn add / npm install @daangamesdg/logger
```

## Usage

Basic Usage

```ts
import { Logger } from "@daangamesdg/logger";

const logger = new Logger({ name: "name", timestamp: true }); // options: { name: string; timestamp?: boolean (default = true) }
logger.info(anything, you, like);
```

Extending

```ts
/* CustomFormatter.ts */
import { Structure } from "@daangamesdg/logger";

Structure.extend(
	"Formatter",
	(Formatter) =>
		class CustomFormatter extends Formatter {
			// do what ever you want here

			// example
			public test(): void {
				console.log("test");
			}
		}
);

declare module "@daangamesdg/logger" {
	class Formatter {
		test(): void;
	}
}

/* index.ts */
import "absolute/path/to/CustomFormatter";
import { Formatter } from "@daangamesdg/logger";

const formatter = new Formatter().test();
logger.test(); // logs "test"
```

_Note: the examples writting in TypeScript_

## Author

👤 **DaanGamesDG**

- Website: https://daangamesdg.wtf/
- Email: <daan@daangamesdg.wtf>
- Twitter: [@DaanGamesDG](https://twitter.com/DaanGamesDG)
- Github: [@DaanGamesDG](https://github.com/DaanGamesDG)

### Lisence

Project is licensed under the © [**MIT License**](/LICENSE)

---

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