add documentation, fix package meta, bump the minor version, why not - yolo

This commit is contained in:
2024-11-13 20:24:24 -05:00
parent 6bb79b1982
commit 354e07817d
3 changed files with 67 additions and 6 deletions

32
README.md Normal file
View File

@@ -0,0 +1,32 @@
# Undead Logging
Logging for stupid idiots like me
```ts
import Logging from "@proxnet/undead-logging"
const log = new Logging("Main");
log.i("Hello World!");
```
Disable a source:
```ts
// .. logging source is in the scope
log.visible = false;
log.debug("I can't be seen!");
// no output
```
Change a source's name:
```ts
// .. logging source "Main" is in the scope
log.n("Network is networking");
log.source = "Main2";
log.n("Something happened");
// output:
// 2024-11-14T01:21:40.350Z Main [NETWORK] Network is networking
// 2024-11-14T01:21:40.350Z Main2 [NETWORK] Something happened
```