New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

zerilog

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerilog

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
16
-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

🚀Zerilog

Zerilog is a TypeScript logging framework inspired by Serilog, designed to provide a flexible and structured logging solution for TypeScript applications. It simplifies the process of logging, offering rich features and customization options to suit various logging needs.

Features

  • 🏗️ Structured Logging: Log messages with structured data to easily filter and search logs.
  • 🚰 Multiple "Zinks": Output logs to different destinations (console, file, HTTP, etc.).
  • ⚙️ Configurable Enrichers: Enrich log events with additional contextual information.
  • 📊 Support for Logging Levels: Control the verbosity of logs with different logging levels (e.g., debug, info, warn, error).
  • 📝 Template-Based Messages: Use template-based messages for consistent and readable logs.
  • 🔄 Asynchronous Logging: Efficiently handle logging in asynchronous environments.

Getting Started

To get started with Zerilog, install the package using npm:

npm install zerilog
yarn add zerilog
pnpm add zerilog

Usage

Here's a quick example to get you started:

import { LoggerConfiguration } from "zerilog";

// A simple console zink to log events to the console.
// npm install @zerilog/consolezink
import ConsoleZink from "@zerilog/consolezink";

const logger = new LoggerConfiguration()
	.writeTo.sink(new ConsoleZink())
	.createLogger();

logger.information("Hello World");
logger.information("Support for {Variable} strings!", "Formatted");

Implementing a Custom Zink

Zerilog allows you to define custom "zinks" (destinations for your logs). Here's a simple example of a console zink:

import { ILogZink, LogEvent } from "zerilog";

class ConsoleZink implements ILogZink {
	log(event: LogEvent): void {
		console.log(event.message.renderedMessage);
	}
}

Contact

  • Discord
  • Github

Acknowledgements

  • Heavily inspired by Serilog.

Keywords

zerilog

FAQs

Package last updated on 05 Feb 2026

Did you know?

Socket

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.

Install

Related posts