Skip to content

How to tell the compiler that a method is a logger method?  #59

@JinsPeter

Description

@JinsPeter

I have been trying out the SerilogAnalyser. Unlike the examples in the Readme, I have Custom Logger Interface which has all the log methods.
Since, we are moving to structured logging, we would like to employ some kind of analyzer to verify the code at the compile time to see if the log entries are done correctly.

I used the MessageTemplateFormatMethod attribute approach on my interface methods and it did the job.
I was wondering if we could make the Attribute name itself configurable so that my core code, where the logging interface is defined does not have a dependency on any specific logging framework.

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