l library

Logger library

Cross-platform html/io Logger with simple API. No need to create an object. Just import and use. Simple and w/o boilerplate. Work with native console and can store logs in txt files (io) and indexedDB (web). You can change verbose level and resume/pause log queue, also you can clear console.

Key features

MethodDescription
sA shout is always displayed
vRegular message with verbose level 1
eError message with verbose level 1
vvRegular message with verbose level 2
wWarning message with verbose level 2
vvvRegular message with verbose level 3
iInform message with verbose level 3
vvvvRegular message with verbose level 4
dDebug message with verbose level 4
vvvvvRegular message with verbose level 5
vvvvvvRegular message with verbose level 6

Setup and management

MethodDescription
lvlLimiting output level (r: 3, d: 6)
storeSet to true to save logs (false)
wideDisplay wide prefix entry (false)
pausePause for message queue
resumeContinued after a pause
clearConsole cleaning

Integration capabilities

MethodDescription
streamBroadcast stream receiving logs.
mwMiddleware queue with functions

When there is no direct access to the terminal, it works through print. When it is not possible to get write access to the working directory, the logs are not saved. Do not log sensitive information.

Classes

L
Logger [...]
LogMessage
Message for logging

Properties

l L
Logger [...]
final

Enums

LogLevel
Verbose levels