Best practices for Logging Priority and EventID?

Topics: Logging Application Block
Mar 26, 2007 at 5:12 PM
I've been using EL for a while now, but have always wondered if there is a hidden nugget or blog that gives a best practice view of how to manage priority# and EventId# in the logging block?

I'm really interested to see how other groups manage a priority number from a Enterprise perspective, and if there are custom (or non custom!) apps for managing the allocation and meaning of EventId's. Obviously one could be created, but I would prefer to start from a commonly accepted start point.

Many thanks and keep up the good work,


Oct 16, 2007 at 4:20 PM
Edited Oct 16, 2007 at 4:20 PM
Ive been looking for a standard or best practices for these as well and have come across an example of priorityID's from the code in this article:

here is the Enum David Hay provided in source:

public enum Priority : int
// The values get mapped to the integer Priority values used by Enterprise Library Logging

None = -1, // The default value if one is not specified in Enterprise Library Logging is -1.
Critical = 25,
High = 20,
Medium = 15,
Low = 10,
Trace = 5, // The Tracer class in Enterprise Library Logging uses a priority of 5.
Debug = 4
Oct 17, 2007 at 4:56 AM
I found a blog with a list of codes with their respective EventID's here: