Hangfire.Console icon indicating copy to clipboard operation
Hangfire.Console copied to clipboard

Two requests: AddLines method, and allowing timestamps to be pushed in

Open mmurrell opened this issue 7 years ago • 1 comments

I wrote an NLog Target that pushes all my Logger.Info(...) messages to Hangfire.Console, and it seems to work ok, but I'm concerned about lock statement in AddLine() and logs potentially thrashing the database. Would it be possible add an overload to persist multiple ConsoleLines at the same time? That way I could buffer them and commit a set number of lines at one time.

To accomplish this, and keep support for the timing, we would have to add a Timestamp to the ConsoleLine class and use that instead of DateTime.UtcNow.

If I were to take run at creating a PR, Is this something you would consider pulling into the mainline?

mmurrell avatar Sep 25 '18 13:09 mmurrell

@mmurrell mind sharing your NLog target?

cskiwi avatar Oct 07 '21 11:10 cskiwi