Current collected state Current
Observed since 20 Oct, 17:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
0xlogs
Lightweight and configurable logging utility for Node.js with JSON support and file logging.
0xLogs is a lightweight and configurable logging utility for Node.js applications. It supports JSON parsing, file output, and built-in process event logging to help monitor your app's health and behavior with minimal setup.
npm install 0xlogs
info, warn, error, debuguncaughtExceptionunhandledRejectionSIGINT, SIGTERM, exitconst CreateLog = require("0xlogs");
const log = new CreateLog({
type: "info",
filePath: "./logs.txt",
json: true
});
log("App started", { port: 3000 });
log.setConfig({
type: "error",
json: false
});
| Option | Type | Default | Description |
|---|---|---|---|
type | String | info | Log level (info, warn, error, debug) |
filePath | String | undefined | Path to output log file (optional) |
json | Boolean | true | Enable JSON formatting for logs |
When require("0xlogs") is invoked, it automatically logs:
SIGINT, SIGTERMprocess.send)Example logs:
[~] [ERROR] Uncaught Exception: ...
[~] [INFO] Exited Application.
[~] [WARN] A promise rejection was handled asynchronously: ...
0xlogs/
├── lib/
│ ├── index.js # Combines validation utilities and config types
│ ├── process/
│ │ ├── index.js # Handles process-level logging
│ ├── types/
│ │ ├── index.js # Schema definition
│ ├── functions/
│ │ ├── index.js # Config & path validation
├── index.js # Main class (CreateLog)
MIT © 2025
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"shasum": "478beec723de2ea332bcd60ab78a1ceb313a86ca",
"tarball": "https://registry.npmjs.org/0xlogs/-/0xlogs-0.0.3.tgz",
"fileCount": 8,
"integrity": "sha512-Y/5I0S5BOqGKEXzfd2N6gz9ur3LPqy5P70vnAbB8WfcGSFRM/Wx/UbIFeXlQDsu+kPbKg68vTtU1FuGLQC4DOQ==",
"signatures": [
{
"sig": "MEUCIHU1j2sYMrkg/THtJQ0C2tdwKhwkJaGofjQhD4jbSZbGAiEAhRBR+ukWujqvMZ+VhuSrn6L2Rv/tVKBvPiL0e08kb3I=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 9401
}Observed since 20 Oct, 17:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:a2dc9051da4eef5a09e3f77a24db2dbaf7286a3422f9143a3af80cfa46cfe2a5