
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Easy-to-use library for debugging your code
NOTE! This library is still in development and may not work as expected!
You can contact us on our Discord server
calling debux()
will always return the same instance on debux that was initialized within the same process!
const debux = require("debux");
const debug = debux();
debug.log("This is a log");
Different methods
debug.log("this is a log", {
process: "process",
class: "className",
function: "function",
event: "event"
});
debug.error("this is an error", {
process: "process",
class: "className",
function: "function",
event: "event"
});
debug.warn("this is a warning", {
process: "process",
class: "className",
function: "function",
event: "event"
});
debug.info("this is info", {
process: "process",
class: "className",
function: "function",
event: "event"
});
debug.logs() // will log all logs in the cache
/*
[
'Tue, 06 Jul 2021 13:18:24 GMT | log | process | className | event | function | this is a log',
'Tue, 06 Jul 2021 13:18:24 GMT | error | process | className | event | function | this is an error',
'Tue, 06 Jul 2021 13:18:24 GMT | warn | process | className | event | function | this is a warning',
'Tue, 06 Jul 2021 13:18:24 GMT | info | process | className | event | function | this is info'
]
De
*/
debux.log(string | null, Options?)
logs a simple informative log
debux.error(string, Options?)
logs an error
debux.warn(string, Options?)
logs a warning
debux.info(string, Options?)
logs information about code
interface Options {
process?: string;// the process this log was created on
class?: string;// the class this log was created in
function?: string;// the function this log came from
event?: string;// the event this log is apart of
}
interface constructOptions {
maxCacheSize?: number;// how many logs to cache at a time
logLevel?: level;// which logs should be logged into console directly
includeMilliseconds?: boolean;// whether to include milliseconds in the date string
logFile?: PathLike;// optional path to a file where to write all logs
}
export enum level {
nothing = 0,// won't log anything to console
error = 1,// only logs errors
warning = 2,// logs warnings and errors
info = 3,// logs info, warnings and errors
all = 4// logs everything
}
Copyright (c) 2022 MatteZ02
FAQs
Easy-to-use library for debugging your code
The npm package debux receives a total of 61 weekly downloads. As such, debux popularity was classified as not popular.
We found that debux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.