RejectedSoftware Forums

Sign up

Request and exception logging

I have a vibe.d application where I would like to log all requests to
one file and any potential exceptions to another file. I would also like
have log rotation so I get a new file for each day.

Is there any built-in functionality for this?

/Jacob Carlborg

Re: Request and exception logging

Am 21.02.2016 um 13:33 schrieb Jacob Carlborg:

I have a vibe.d application where I would like to log all requests to
one file and any potential exceptions to another file. I would also like
have log rotation so I get a new file for each day.

Is there any built-in functionality for this?

The current HTTP access log implementation doesn't support log rotation
(yet), so you'd have to implement it yourself. You can derive from
HTTPLogger.

Logging exceptions/errors can be done from the error page handler
(HTTPServerSettings.errorPageHandler), but there is no built-in
logging facility for this.

Re: Request and exception logging

On 2016-02-22 12:39, Sönke Ludwig wrote:

The current HTTP access log implementation doesn't support log rotation
(yet), so you'd have to implement it yourself. You can derive from
HTTPLogger.

Logging exceptions/errors can be done from the error page handler
(HTTPServerSettings.errorPageHandler), but there is no built-in
logging facility for this.

Thanks.

/Jacob Carlborg