Section 3 of 4 ArgusLogs.DataAnnotation
How they work together
When a method marked with [LogMethod] runs and calls ArgusLogs, the manual logs are grouped under the same context trace, producing structured logs:
public class OrderService
{
[LogMethod]
public void SubmitOrder(Order order)
{
// 1. [LogMethod] logs: ENTER - SubmitOrder (Parameters: order)
ArgusLogs.Info("Validating order inventory"); // 2. Logs within the active TraceId
if (order.Amount > 10000)
{
ArgusLogs.Warning("High-value order flagged"); // 3. Same TraceId
}
// 4. [LogMethod] logs: EXIT - SubmitOrder (Duration: 42ms)
}
}