Method boundary category
Declarative interception with [LogMethod] generates structural logs for method execution states: ENTER, EXIT (on success), and EXCEPTION (on failure). Category: "MethodBoundary".
Pathway 1 — successful execution
When a method runs and completes without throwing errors:
[Start Method Call]
│
▼
1. OnEntry(args) <-- Generates "ENTER" Log
│
▼
[Method Executes] <-- Target method body runs
│
▼
2. OnSuccess(args) <-- Generates "EXIT" Log (Success & Duration)
│
▼
3. OnExit(args) <-- Final cleanup hook (always runs)Pathway 2 — exceptional execution
When an unhandled exception is thrown inside the method body:
[Start Method Call]
│
▼
1. OnEntry(args) <-- Generates "ENTER" Log
│
▼
[Method Executes] <-- Target method body runs (Throws Exception)
│
▼
2. OnException(args) <-- Generates "EXCEPTION" Log (Error & StackTrace)
│
▼
3. OnExit(args) <-- Final cleanup hook (always runs)Below are the exact structured log arrays emitted during execution. Notice how logNum sequences chronologically within the shared traceId context.
Pathway 1 logs — success sequence
When a decorated method completes successfully, it emits these two log objects in order:
[
{
"timestamp": "2026-07-30T19:55:05.150Z",
"level": "Information",
"category": "MethodBoundary",
"message": "ENTER - Processing billing validation",
"traceId": "fa7dedf4-ec83-4b6e-a3f3-01883f7047b6",
"spanId": "9b12a83f-42e1-48bf-a1f9-cf12da9f9210",
"logNum": 1,
"methodName": "BillingService.ValidateSubscription",
"data": {
"caller": "ProjectsController.GetProjects",
"parameter": {
"projectId": "491cc020-b2d7-4eca-8245-06e4361ee6f4",
"tier": "Enterprise"
}
}
},
{
"timestamp": "2026-07-30T19:55:05.165Z",
"level": "Information",
"category": "MethodBoundary",
"message": "EXIT - Processing billing validation",
"traceId": "fa7dedf4-ec83-4b6e-a3f3-01883f7047b6",
"spanId": "9b12a83f-42e1-48bf-a1f9-cf12da9f9210",
"logNum": 2,
"duration": "15.02ms",
"methodName": "BillingService.ValidateSubscription",
"data": {
"returnValue": {
"isValid": true,
"expiresAt": "2027-07-30T00:00:00Z"
}
}
}
]Pathway 2 logs — exception sequence
When a decorated method throws an unhandled exception, it emits these two log objects:
[
{
"timestamp": "2026-07-30T19:55:05.150Z",
"level": "Information",
"category": "MethodBoundary",
"message": "ENTER - Processing billing validation",
"traceId": "fa7dedf4-ec83-4b6e-a3f3-01883f7047b6",
"spanId": "9b12a83f-42e1-48bf-a1f9-cf12da9f9210",
"logNum": 1,
"methodName": "BillingService.ValidateSubscription",
"data": {
"caller": "ProjectsController.GetProjects",
"parameter": {
"projectId": "491cc020-b2d7-4eca-8245-06e4361ee6f4",
"tier": "Enterprise"
}
}
},
{
"timestamp": "2026-07-30T19:55:05.167Z",
"level": "Error",
"category": "MethodBoundary",
"message": "EXCEPTION - Processing billing validation",
"traceId": "fa7dedf4-ec83-4b6e-a3f3-01883f7047b6",
"spanId": "9b12a83f-42e1-48bf-a1f9-cf12da9f9210",
"logNum": 2,
"methodName": "BillingService.ValidateSubscription",
"data": {
"exception": "SubscriptionExpiredException: The enterprise subscription has expired.",
"stackTrace": " at ArgusLogs.BillingService.ValidateSubscription(Guid projectId, String tier) in C:\\BillingService.cs:line 45\n at ProjectsController.GetProjects() in C:\\ProjectsController.cs:line 20"
}
}
]