When writing to the Windows Event Log, is it possible to create a custom link text for URLs?
Posted
by
thomasnguyencom
on Stack Overflow
See other posts from Stack Overflow
or by thomasnguyencom
Published on 2010-12-14T15:23:10Z
Indexed on
2010/12/22
0:54 UTC
Read the original article
Hit count: 318
I'm just using the vanilla EventLog.WriteEntry
method:
EventLog.WriteEntry(EVENT_SOURCE, message, EventLogEntryType.Error, id);
Here's how the message shows up in the Event Log, with the links in the parenthesis working just fine, but it's ugly:
Example 1:
Please contact us via email (mailto:[email protected]) or online (http://example.com).
Here's how the message shows up in the Event Log, with the HTML "markup", doesn't even handle it:
Example 2:
Please contact us via <a href="mailto:[email protected]">email</a> or <a href="http://example.com">online</a>.
This is how I would like the message to show up, but with "email" and "online" as the link texts:
Example 3:
Please contact us via email or online.
I've tried the <a href>...</a>
HTML tags with no success.
© Stack Overflow or respective owner