Skip to content

If function has a logger as parameter use it! #14

@allevo

Description

@allevo

I've a function like this

fn get_something(log: Logger) -> Result<bool, Error> {
  Ok(true)
}

I would like to use this awesome lib in order to log the error using the first parameter.
For more generic usage

 #[logfn(Err = "Error", fmt = "Failed Sending Packet: {:?}", logger = "my_obj.log")]
fn get_something(my_obj: MyObj) -> Result<bool, Error> {
  Ok(true)
}

If you are interested, I may send a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions