From 45ba81a3c033108c7d5a1e6500ba5a9951a0a829 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 7 Nov 2022 13:49:01 +0200 Subject: [PATCH] add options documentation to readme --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ba5c52..056e18e 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,15 @@ Simple logger I wrote to have a unified system for logging throughout my project ## Features Split into Master and Client for logging between processes, where master resides on the master process and the clients on the spawned processes. -Should be fairly trivial to modify it to work across nodes with websockets. \ No newline at end of file +Should be fairly trivial to modify it to work across nodes with websockets. + +## Logger Options +``` +{ + customTypes: [], // Log types, defaults are 'error', 'warn', 'info', 'debug', 'status'. Each one of these has an associated shorthand function, the custom ones will receive one too, e.g. adding 'access' to the custom types will add a logger.access() function + customStreams: [], // File streams, by default there are streams for error and default + customTypeMapping: {}, // This maps a type to a stream, e.g. adding "warn": "error" will pipe any warnings to the error log file + customColors: {}, // Supports any colours chalk.js supports, e.g. "warn": "green" will turn warning outputs green + debug: false +} +``` \ No newline at end of file