Skip to content
ValaTuxPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Monolog

Vala Meson License

A lightweight, Monolog-inspired logging library for Vala with handlers, formatters, processors, and tests.

Quick nav

Quick start

meson setup builddir
meson compile -C builddir
meson test -C builddir

Features

  • 🧾 Structured logger with levels such as debug, info, warning, error, and more
  • 🧱 Handlers for streams, console, and syslog
  • 🎨 Formatter abstraction with a default formatter
  • ⚙️ Processor pipeline for context, tags, extra data, and request metadata
  • ✅ Meson-based test suite

Build

meson setup builddir
meson compile -C builddir

Tests

meson test -C builddir

Usage example

using ValaTux.Monolog;
using ValaTux.Monolog.Handler;
using ValaTux.Monolog.Processor;

var logger = new Logger ("demo");
logger.add_handler (new StreamHandler ("/tmp/monolog.log"));

var context = new ContextProcessor ();
context.add_context ("request_id", "42");
logger.add_processor (context);

var tags = new TagProcessor ();
tags.add_tag ("api");
tags.add_tag ("auth");
logger.add_processor (tags);

logger.info ("hello from monolog");

Available processors

  • ContextProcessor: adds key/value context to the message
  • TagProcessor: prefixes the message with tags
  • IntrospectionProcessor: adds runtime metadata such as PID
  • ExtraDataProcessor: adds custom extra fields
  • RequestContextProcessor: adds request-scoped information

License

MIT. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages