Skip to content

[Log] attribute

The [Log] attribute for method-level entry/exit/error logging is now handled by the ZibStack.NET.Aop package.

See the full documentation at: AOP — Log Attribute

  • Install ZibStack.NET.Aop (not ZibStack.NET.Log) to use [Log]
  • Call app.Services.UseAop() at startup
  • The ZibStack.NET.Log package provides only interpolated-string logging (_logger.LogInformation($"..."))

If you previously installed ZibStack.NET.Log for the [Log] attribute, add ZibStack.NET.Aop:

Terminal window
dotnet add package ZibStack.NET.Aop

Update your using directives:

// Before:
using ZibStack.NET.Log;
// After:
using ZibStack.NET.Aop;

The [Log], [Sensitive], [NoLog] attributes and ILogConfigurator are now in the ZibStack.NET.Aop namespace. The old ZibStack.NET.Log namespace still works for [Sensitive] and [NoLog] (backward compatibility), but using ZibStack.NET.Aop; is the canonical import going forward.