2024-11-16 13:39:10 -05:00
2024-11-13 20:07:09 -05:00
2024-11-16 13:35:30 -05:00
2024-11-13 20:07:09 -05:00
2024-11-16 13:35:30 -05:00
2024-11-16 13:39:10 -05:00

Undead Logging

Logging for stupid idiots like me

import Logging from "@proxnet/undead-logging"

const log = new Logging("Main");

log.i("Hello World!");

Disable a source:

// .. logging source is in the scope
log.visible = false;

log.debug("I can't be seen!");

// no output

Change a source's name:

// .. 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

Disable a type of message globally:

import Logging, { MessageTypeVisibility } from "./mod.ts";
// .. logging source "Main" is in the scope

MessageTypeVisibility.Error = false;

// somewhere else, could be a different script
log.i("I am visible");
log.error("I am not visible");

// output:
// 2024-11-14T01:21:40.350Z Main [INFO] I am visible
Description
Egotistical Logging 2: electric boogaloo
Readme 95 KiB
Languages
TypeScript 100%