New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@andreas-timm/logger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andreas-timm/logger

Small Bun-first logger wrapper around winston

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@andreas-timm/logger

Small Bun-first logging utilities built on top of winston.

Features

  • Create a configured winston logger with console output.
  • Add a synchronous file transport by passing an output path.
  • Truncate an output file on logger creation with flag: "w".
  • Prefix debug messages consistently while keeping the API small.

Install

bun add @andreas-timm/logger

Usage

import { getLogger } from "@andreas-timm/logger";

const logger = getLogger();

logger.info("Application started");
logger.error("File not found");

To write log lines to a file as well as the console:

import { getLogger } from "@andreas-timm/logger";

const logger = getLogger({
    flag: "w",
    output: "tmp/app.log",
});

logger.info("Written to console and file");

Pass file: false to keep the same options object shape while disabling file output.

Keywords

bun

FAQs

Package last updated on 07 Jul 2026

Related posts