glogger icon indicating copy to clipboard operation
glogger copied to clipboard

A simple logger for Deno with minimal setup.

trafficstars

glogger

A simple logger for Deno

image

Example Code

Regular Logging

import GLogger from "https://deno.land/x/[email protected]/mod.ts";

let logger = new GLogger("Example");
logger.info("Hello from Example");

File Logging

All you have to do is to get file logging is to pass true to the logToFile parameter, and pass a location to the logFolder parameter, the logFolder paramater defaults to ./logs/

import GLogger from "https://deno.land/x/[email protected]/mod.ts";

// this enables file logging, and puts the `.log` files in `my/path/to/log/folder`
let logger = new GLogger("Example", true, "my/path/to/log/folder");
logger.info("Hello from Example");

Contributing

If you have any contributions, feel free to make a PR.