Skip to Content
🎉 Hyperse Logger has been published.
Documentationlogger-plugin-stdout

Logger Stdout Plugin

This plugin is the official standard output plugin for Hyperse Logger , designed specifically for Node.js environments. It outputs logs to the terminal (stdout/stderr) in a consistent, structured format, supporting JSON-compatible output for easy log collection and analysis. Ideal for server-side and containerized applications, it ensures your logs are well-formatted, easy to process, and ready for integration with log management systems.

Installation

npm install @hyperse/logger-plugin-stdout

Usage

// @filename: @hyperse/logger-plugin-stdout/dist/index.d.ts import { , , } from '@hyperse/logger-plugin-stdout'; import { , } from '@hyperse/logger'; const = ({ : 'hps-logger', : ., }) .(()) .(); .('info message');

Output

stdout output

API

createStdoutPlugin

Parameters:
NameTypeDefault
optionsStdoutOptions

Optional configuration options for the plugin.

Returns:
LoggerPlugin<object>

A new logger plugin that outputs formatted log messages to Node.js stdout.

StdoutOptions

NameTypeDefault
disableboolean

If true, the plugin will be disabled

false
showLoggerNameboolean

If true, the logger name will be shown

false
capitalizeLoggerNameboolean

If true, the logger name will be capitalized

false
showPluginNameboolean

If true, the plugin name will be shown

false
capitalizePluginNameboolean

If true, the plugin name will be capitalized

false
showPrefixboolean

If true, the prefix will be shown

true
showLevelNameboolean

If true, each message logged to the terminal will have the name of the level of the message attached to it.

[ FATAL ] WHAT WILL I DO?!

true
capitalizeLevelNameboolean

If true, the level name will be capitalized

true
showDateboolean

If true, each message logged to the terminal will have a date corresponding to when the message was logged attached to it.

[ 2025-7-1 ] foo

false
showTimestampboolean

If true, each message logged to the terminal will have a timestamp corresponding to the exact time the message was logged.

[ 13:43:10.23 ] bar

true
use24HourClockboolean

If true, the timestamp on each message logged to the stdout will be displayed using the 24 hour clock instead of the 12 hour clock. Keep in mind that the timestamp of when a log was logged to the stdout is only displayed when showTimestamp is also true.

24 hour clock:

[ 13:27:55.33 ] pow

12 hour clock:

[ 1:27:55.33 PM ] pow

true
showArrowboolean

Whether or not to show a cool arrow before a log’s message.

>> baz

false
noColorboolean

Removes colors from the stdout writing

false
levelColorColor

The color of the level of the message

{ [LogLevel.Error]: 'red', [LogLevel.Warn]: 'yellow', [LogLevel.Info]: 'green', [LogLevel.Debug]: 'blue', [LogLevel.Verbose]: 'magenta', }
prefixColorColor[]

The color of the prefix

['bold', 'magenta']
loggerNameColorColor[]

The color of the logger name

['bold', 'magenta']
pluginNameColorColor[]

The color of the plugin name

['bold', 'magenta']
Last updated on