🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@loglayer/plugin-sprintf

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loglayer/plugin-sprintf

sprintf plugin for loglayer.

latest
Source
npmnpm
Version
3.0.2
Version published
Maintainers
1
Created
Source

Sprintf Plugin for LogLayer

NPM Version NPM Downloads TypeScript

The sprintf plugin for loglayer provides printf-style string formatting support using sprintf-js.

It allows you to format your log messages using familiar printf-style placeholders if a transport does not support this behavior.

Disclaimer

  • LogLayer does not allow passing items that are not strings, booleans, or numbers into message methods like info, error, etc, and would recommend that only string / boolean / number specifiers be used.

Installation

npm install @loglayer/plugin-sprintf

Usage

import { LogLayer, ConsoleTransport } from 'loglayer'
import { sprintfPlugin } from '@loglayer/plugin-sprintf'

const log = new LogLayer({
  transport: new ConsoleTransport({
    logger: console
  }),
  plugins: [
    sprintfPlugin()
  ]
})

// Example usage
log.info("Hello %s!", "world")
// Output: Hello world!

log.info("Number: %d", 42)
// Output: Number: 42

Documentation

For more details, visit https://loglayer.dev/plugins/sprintf

Keywords

logging

FAQs

Package last updated on 14 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