Hangfire.Console
Hangfire.Console copied to clipboard
Adding support for HTML logging.
Potential fix for issue https://github.com/pieceofsummer/Hangfire.Console/issues/14.
Allows the use of context.WriteHtmlLine(string message) in order to write raw (unencoded) HTML to the dashboard for use of links etc.
Sample image below using WriteHtmlLine to insert a link to elasticsearch query through Kibana to display all the structured log messaged from this Hangfire job.
I don't like the idea of writing an unencoded html, because it can accidentally break the layout
what if properties for label and src were created instead and it would always generate a structured 'a' tag?
What about something similar to:
context.WriteLinks("Here is a {0} and another {1}", new HtmlLink { Text = "link", Url = "http://url" }, new HtmlLink { Text = "link here.", Url = "http://url2" });
Still allows you to format how to display the links but won't allow user to put unencoded HTML directly into dashboard.
@plaisted - the url recognizer is really cool - you can't format the display, but it works great for linking to related data and to other related jobs :smile: