1.2.0 • Published 8 months ago
@saasquatch/logger v1.2.0
The SaaSquatch logging package facilitates unified structured logging across all NodeJS-based SaaSquatch services. It wraps Winston and provides standard log formats for general logging, debugging, and HTTP services.
Getting Started
Install the package from NPM:
npm install @saasquatch/logger
Basic usage:
import { initializeLogger, getLogger } from "@saasquatch/logger";
function main() {
const logger = initializeLogger();
logger.info("Hello");
otherFunction();
}
function otherFunction() {
getLogger()!.info("World!");
}
main();
Express HTTP logging middleware:
import express from "express";
import { httpLogMiddleware, initializeLogger } from "@saasquatch/logger";
const server = express();
const logger = initializeLogger();
server.use(httpLogMiddleware(logger));
1.2.0
8 months ago
1.1.2-0
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago
1.1.0-0
1 year ago
1.0.0
1 year ago
1.0.0-5
2 years ago
1.0.0-4
2 years ago
1.0.0-7
2 years ago
1.0.0-6
2 years ago
1.0.0-9
2 years ago
1.0.0-8
2 years ago
1.0.0-10
2 years ago
1.0.0-11
2 years ago
1.0.0-12
2 years ago
1.0.0-3
2 years ago
1.0.0-2
2 years ago
1.0.0-1
2 years ago
1.0.0-0
2 years ago