Code Monkey home page Code Monkey logo

extlog's Introduction

This crate adds support for external logs, and for statistics tracking through those logs, to the slog ecosystem.

This crate was written by Metaswitch Networks (@Metaswitch) and made freely available under the Apache License. Contributions are welcome.

Overview

External logs are logs that form an external API that end users can rely on, and that do not change without explicit agreement. Using them allows you to treat logs as objects, rather than strings with metadata, allowing compile-time checking of logs.

This repository provides the following.

  • An API for easily defining external logs.
  • An API for defining statistic values to track, and to modify them based on the external logs
  • A StatisticsLogger type that wraps an slog::Logger, which handles logging and updating tracked stats.
  • An xlog! macro for making the logs through the StatisticsLogger.
  • An API for retrieving the current values of all stats from the StatisticsLogger.

Use of this crate

In theory, an external log can be defined simply by making any type implement ExtLoggable. In practice, external logs will be generated by auto-deriving the ExtLoggable trait using the slog-extlog-derive crate from this repository.

Logs can then be generated by using the xlog! macro to make the logs using a StatisticsLogger - a wrapper around slog::Logger which can also track stats.

For more details, see:

extlog's People

Contributors

j-buckland avatar mthebridge avatar nigelthorpe avatar tca-ms avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.