@nosytools/logger-web
v1.6.0
Published
Nosy Logger for web projects. Keep your logs encrypted and secure.
Downloads
7
Maintainers
Readme
Nosy Logger for web
Usage
Firstly, initialize logger once. Make sure you do it on client side (where there is an access to window
).
import { init } from "@nosytools/logger-web";
init({ apiKey: "your api key" });
After that, you may simply use it anywhere you need. You may use either use log
message with specified Level
or use on of level scoped methods - debug
, info
, warning
, error
.
import { log, debug } from "@nosytools/logger-web";
const onButtonClicked = () => {
log("my button clicked", "debug");
// or the short form
debug("my button clicked");
};
When using log
, you may use one of the log levels: debug
, info
, warn
or error
.