- I am logging messages using Enterprise Library.
- I want some of these (typically errors and warnings) to be passed to the Windows event-system). I today route these via entlib.config.
This solution works and so far, so good. But, I have more needs than what this solution provides me. I have multiple installations that should log to different logs, but I want their names to be logical and intuitive in the event-viewer. But, the Windows event-system cannot have two categories where the first 8 characters in the name are the same. The category-name can be longer, but only the first 8 letters is used to distinguish them. .Net actually outputs a warning if this happens:
Only the first eight characters of a custom log name are significant, and there is already another log on the system using the first eight characters of the name given.
Currently I have to resort to cryptical prefixes, but I am still in danger of having multiple installations "colliding" with each other in regrads to the logname, so I need a better solution.
However, in the event viewer on my computer I can see that there are also hierarchies of lognames - which is exactly what I need. Both Microsoft and Cisco obviously has found a way to do this:
But, how can I create such an hierarchy for logging, where each application may be installed a number of times? Like this:
CompanyName
ApplicationName
Installation1
Installation2