destructurama / attributed

Use attributes to control how complex types are logged to Serilog.
Apache License 2.0
269 stars 33 forks source link

Add LogWithName attribute #51

Closed paymanx closed 3 years ago

paymanx commented 3 years ago

The usage of this attribute is when you want to save properties with different name.

When you want to log object properties with different name you can use this attribute. For example, you have a class that has a MessageType property but you want to log MessageType data with "mt" to reduce log file size.

You can use:

class Message
{
    [LogWithName("mt")]
    public int MessageType
    {
        get;
        set;
    }
}
paymanx commented 3 years ago

the issues has been resovled

SimonCropp commented 3 years ago

this has now been deployed