From df15f608ede5f47989494a9cf813308bf04ff0e5 Mon Sep 17 00:00:00 2001 From: zombieb Date: Sat, 16 Nov 2024 13:39:10 -0500 Subject: [PATCH] Update README --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index c799490..5f337a8 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Disable a source: log.visible = false; log.debug("I can't be seen!"); + // no output ``` @@ -29,4 +30,19 @@ 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: +```ts +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 ``` \ No newline at end of file