Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add external logs (loggable objects) for use with the slog ecosystem.

License

NotificationsYou must be signed in to change notification settings

slog-rs/extlog

Repository files navigation

This crate adds support forexternal logs, and for statistics tracking through those logs, to theslog ecosystem.

This crate was written by Metaswitch Networks (@Metaswitch) and made freely available under theApache 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 allowsyou 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
  • AStatisticsLogger type that wraps anslog::Logger, which handles logging and updating tracked stats.
  • Anxlog! macro for making the logs through theStatisticsLogger.
  • An API for retrieving the current values of all stats from theStatisticsLogger.

Use of this crate

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

Logs can then be generated by using thexlog! macro to make the logs using aStatisticsLogger - a wrapper aroundslog::Logger which can also track stats.

For more details, see:

About

Add external logs (loggable objects) for use with the slog ecosystem.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp