Log with timestamps and levels.
spago install structured-loggingimport 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 | ERRORThe 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 UnitFor convenience log is exported as an alias for info:
log ∷ ∀ m. MonadEffect m ⇒ String → m UnitDocumentation and more detailed examples are hosted on Pursuit.
To install dependencies:
yarn install
yarn spago installTo run tests:
yarn spago testTo generate the documentation locally:
yarn spago docsTo run linters:
yarn lintTo run formatters:
yarn formatPlease 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- Joel Lefkowitz - Initial work
Lots of love to the open source community!