All Projects → serokell → Log Warper

serokell / Log Warper

Licence: mit
Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Log Warper

Log4qt
Log4Qt - Logging for the Qt cross-platform application framework
Stars: ✭ 292 (+1725%)
Mutual labels:  logging-library
Exceptionless.net
Exceptionless clients for the .NET platform
Stars: ✭ 362 (+2162.5%)
Mutual labels:  logging-library
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+2543.75%)
Mutual labels:  logging-library
Daiquiri
Python library to easily setup basic logging functionality
Stars: ✭ 308 (+1825%)
Mutual labels:  logging-library
Reckless
Reckless logging. Low-latency, high-throughput, asynchronous logging library for C++.
Stars: ✭ 358 (+2137.5%)
Mutual labels:  logging-library
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+23456.25%)
Mutual labels:  logging-library
Woodlot
An all-in-one JSON logging utility that supports ExpressJS HTTP logging, custom logging, provides multi-format output and an easy to use events API.
Stars: ✭ 263 (+1543.75%)
Mutual labels:  logging-library
Nlog
NLog - Advanced and Structured Logging for Various .NET Platforms
Stars: ✭ 5,296 (+33000%)
Mutual labels:  logging-library
Trojan
Trojan is an efficient mobile terminal lightweight log SDK
Stars: ✭ 360 (+2150%)
Mutual labels:  logging-library
Quill
Asynchronous Low Latency C++ Logging Library
Stars: ✭ 422 (+2537.5%)
Mutual labels:  logging-library
Nlog.extensions.logging
NLog Provider for Microsoft.Extensions.Logging for .NET Standard libraries and .NET Core applications
Stars: ✭ 323 (+1918.75%)
Mutual labels:  logging-library
Electron Timber
Pretty logger for Electron apps
Stars: ✭ 337 (+2006.25%)
Mutual labels:  logging-library
Xcglogger
A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.
Stars: ✭ 3,710 (+23087.5%)
Mutual labels:  logging-library
Scribe
The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
Stars: ✭ 304 (+1800%)
Mutual labels:  logging-library
Logstash Logger
Ruby logger that writes logstash events
Stars: ✭ 442 (+2662.5%)
Mutual labels:  logging-library
Easyloggingpp
Single header C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
Stars: ✭ 3,032 (+18850%)
Mutual labels:  logging-library
Tinylog
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android
Stars: ✭ 360 (+2150%)
Mutual labels:  logging-library
Screenlog.js
Bring console.log on the screen
Stars: ✭ 591 (+3593.75%)
Mutual labels:  logging-library
Fern
Simple, efficient logging for Rust
Stars: ✭ 524 (+3175%)
Mutual labels:  logging-library
Sharedhashfile
Share Hash Tables With Stable Key Hints Stored In Memory Mapped Files Between Arbitrary Processes
Stars: ✭ 380 (+2275%)
Mutual labels:  logging-library

log-warper

Build Status Hackage Stackage LTS Stackage Nightly License: MIT

log-warper is a high level and featureful logging library with monadic interface.

You can jump right into introduction tutorial to see how to write logging with log-warper.

Features

Here is the list of features log-warper provides.

  1. Hierarchical logger names.

    Logger names (tags for loggers) form hierarchy. It means, that "" (also known as mempty or rootLoggerName) is a parent of logger with name "node" which is a parent of logger with name "node.communication". So, logger name comprises dot-separated components. This means that if some logger name doesn't have some settings (like severity or output file) it takes its settings from the closest parent, containing this settings.

  2. Logging initialization from .yaml configuration file.

    Whole logging configuration can be specifed in a single .yaml file. See example here.

  3. Monadic logging interface.

    log-warper uses mtl-style type classes to provide monadic interfaces for logging.

  4. Strict StateT based pure logging.

    See this tutorial on pure logging with log-warper.

  5. Different severity levels of messages with the ability to configure Set of severities.

  6. Output is colored ⭐️

    When you log messages, you see time of this logging message, logger name, severity and ThreadId. Message formatting is configurable. Color or logged message tag depends on Severity for this message.

  7. Flexible and easy creation of LoggerConfig using monoidal builders and lenses.

    In case .yaml configuration is not enough for you, you can use lens-based EDSL to create configurations. LoggerConfig also implements instances for Semigroup and Monoid so you can combine your configurations from different sources (CLI and .yaml for example).

  8. Logger rotation.

    log-warper supports logger rotation. Yes, there exist logrotate and similar tools. But it's not easy to configure cross-platform (Windows, Linux, OSX) logging rotation with external tools.

  9. Ability to acquire last N megabytes of logs from in-memory cache.

    In case you want to analyze logging messages you can take them from in-memory cache.

Reference guide (FAQ)

Here you can find hints and tips how to achieve desired behavior with log-warper.

  1. How can I redirect all output to stderr?

    • Write termSeveritiesErr: All on top-level of your .yaml file.
  2. How can I disable only Error messages for my logger?

  3. How can I show ThreadId inside log message?

    • Add showTid: true to your .yaml file.
  4. How to easily disable terminal output?

    • Put these lines into .yaml file:
    termSeveritiesOut : []
    termSeveritiesErr : []
    
  5. How can I enable messages with severity Info and higher?

    • Write severity: Info+ inside tree node of your logger settings.
  6. How can I log inside functions like forkIO?

    • Use liftLogIO function. Its Haddock contains nice usage example.
  7. How can I easily log exceptions without throwing them?

Contributing

This project uses universum as default prelude

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].