using Serilog.Formatting.Compact;
using Destructurama.Attributed;
using Microsoft.Extensions.Logging;
using Serilog.Extensions.Logging;
[LogMasked(ShowFirst=3, PreserveLength=true)]
public string privateName {get; set;}
public string publicName {get; set;}
public string aName {get;set;}
public static void Main()
var logConfig = new LoggerConfiguration()
.WriteTo.Console(new RenderedCompactJsonFormatter())
var log = logConfig.CreateLogger();
ILoggerFactory loggerFactory = new LoggerFactory()
var logger = loggerFactory.CreateLogger<Program>();
privateName = "SUPER SECRET",
publicName = "SUPER PUBLIC NAME"
log.Information("{@a}", a);
logger.LogInformation("{@a}", a);