log-attributes

Crates.iolog-attributes
lib.rslog-attributes
version0.1.0
sourcesrc
created_at2021-11-28 17:38:02.500757
updated_at2021-11-28 17:38:02.500757
descriptionA set of function log attributes, that make logging function in- and outputs a charm.
homepage
repositoryhttps://github.com/DzenanJupic/log-attributes
max_upload_size
id488900
size10,915
Dzenan Jupic (DzenanJupic)

documentation

https://docs.rs/log-attributes

README

log-attributes

crates.io docs.rs licence

build

A set of function log attributes.

This project is currently in active development. It's already usable, but not nearly feature complete.

Overview

log-attributes provides a set of attribute macros, that allow to easily log a function's inputs and return value.

1.0 Roadmap

  • log after function return
  • log before function call
  • allow

Examples

use log_attributes::{log, info};

#[log(warn, "{fn} was called with {a} and returned {return}")]
fn using_log_attribute(a: &[u32]) -> u32 {
    a[0]
}

#[info("{fn} was called")]
fn using_level_attribute() {
    // -- snip --
}

Stay tuned for more.

Contributing

log-attributes is still in a pretty early stage, and you are welcome to contribute to it! The goal is to make logging function inputs and returns more ergonomically.

This project is 100% open source. Any contribution submitted for inclusion in rustube by you, shall have both the MIT licence and the Apache-2.0 licence, and shall be licensed as MIT OR Apache-2.0, without any additional terms or conditions.

Licence

This project is licensed under the terms of the MIT licence or the Apache-2.0 licence, at your own choice.

Commit count: 9

cargo fmt