Skip to main content
Module

x/tiny_logger/tiny-logger.ts>TinyLogger

Logs to console and also writes log entries to either a Csv file or Txt file with Json objects. Slightly opinionated.
Latest
class TinyLogger
import { TinyLogger } from "https://deno.land/x/tiny_logger@v1.0.13/tiny-logger.ts";

Constructors

new
TinyLogger(options?: LogOptions)

Methods

private
init()
private
logToConsole(
level: LogLevels,
source: string,
message: string,
)
private
openFile(file: string)
private
saveCallback(file: Deno.FsFile, data: Uint8Array)
private
writeFile(data: string, saveCallback: (SaveCallback))
debug(source: string, message: string)
enableFileLogging(path?: string)
error(source: string, message: string)
info(source: string, message: string)
warn(source: string, message: string)