Using Log.PushProperty in a request context

Hi,
I would like to know if its possible to use the Log.PushProperty in the context of a request.
I want to avoid using the same statement again and again.
Thanks

Don’t know what you mean, but it’s unrelated and has no knowledge or dependency on IRequest.

I want to push the same property (key and value) across http request.
So when ever I use Log.info, the same properties will be pushed.
Instead of re-declaring: using (Log.PushProperty("trace_id", "my id")) every time I call log.debug, I want to do it once per http request…
Possible?
Thanks

You can’t replace the static loggers, but like anything you want to use across the entire Request Pipeline you can create a custom logger and store it in IRequest.Items dictionary (e.g. in a Global Request Filter) which every Filter or ServiceStack Service in the Request Pipeline will have access to.

1 Like