Skip to content

Description of compile-time log filtering needs clarification #348

@vmalloc

Description

@vmalloc

Reading this: https://docs.rs/log/0.4.8/log/#compile-time-filters, I stumbled across this phrasing:

Log invocations at disabled levels will be skipped and will not even be present in the resulting binary unless the log level is specified dynamically

I don't understand how this can be true -- either the call site is completely eliminated when release_max_level_XXX is used, or it isn't. If it is, I don't see how any dynamic logging adjustment can make it re-appear...

So the question boils down to - if I have a trace! invocation, and I set release_max_level_debug, what will be present in the final binary instead of that trace call? A condition check? nothing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions