Package

purescript-structured-logging

Repository
joellefkowitz/structured-logging
License
MIT
Uploaded by
pacchettibotti
Published on
2025-10-31T16:10:20Z

Log with timestamps and levels.

Review Version Quality

Installing

spago install structured-logging

Usage

import Node.Logger as Logger

Logger.info "message"

This will log with a timestamp and info log level:

{"timestamp":"2025-01-01T00:00:00.000Z","level":"INFO","message":"message"}

The log levels are defined as:

data LogLevel = INFO | WARN | ERROR

The log methods have the familiar MonadEffect classes:

info   m. MonadEffect m  String  m Unit
warn   m. MonadEffect m  String  m Unit
error   m. MonadEffect m  String  m Unit

For convenience log is exported as an alias for info:

log   m. MonadEffect m  String  m Unit

Documentation

Documentation and more detailed examples are hosted on Pursuit.

Tooling

Dependencies

To install dependencies:

yarn install
yarn spago install

Tests

To run tests:

yarn spago test

Documentation

To generate the documentation locally:

yarn spago docs

Linters

To run linters:

yarn lint

Formatters

To run formatters:

yarn format

Contributing

Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.

This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.

Bump2version is used to version and tag changes. For example:

bump2version patch

Contributors

Remarks

Lots of love to the open source community!

Be kind to your mind Love each other It's ok to have a bad day
Modules
Node.Logger
Node.Logger.LogLevel
Node.Logger.LogLine
Dependencies