I was wondering if it is possible to add my custom logging calls to the .NET Logging sensor pack. You currently support log4net and (it seems) Enterprise Library Logging. We are using a variation of the NSpring library.
I've seen other requests for adding log libraries to this, but since NSpring really hasn't had as much visibility or use, I don't expect that you will ever include it.
That only leaves me with really adding the method calls to the Purepath, but this limts the amount of text that is captured in a method value.
Answer by Joe A. ·
Andi,
Thanks. Is there no way to map my methods to the Logging sensor pack? Even with a custom plugin?
I wanted to use the Severity of the log messages to create incidents to alert the support team when too many are occurring. Perhaps this can be achieved in another way? A custom incident rule based on a method argument?
Also, is the 250 character limit enforced on the Logging sensor pack?
Joe
There is no easy way to get your log methods into our logging sensor.
But - as you correctly said: you can create measures and alert on these, e.g: when the count of a certain log message exceeds a threshold
You can also create a Business Transaction that splits your PPs based on the Log Message. This will give you a similar view as the Logging Dashlet. One thing to remember here is that you will probably get a lot of different split values. Now - if you do not intend to chart these individual log messages over time I suggest you click the "Suppress storage of results in Performance Warehouse" still allowing you to get a quick overview of used log messages in e.g: the last 30 minutes - and - you can still create individual measures for specific log messages as described in the top to use for alerting
As for the 250 char limit: correct - this limit also applies for the built-in logging sensor
Andi
Answer by Andreas G. ·
Hi Joe
You are right - the best option is to create your own sensor rules and capture the log message as method argument. As for the length limitation. In your System Profile you can specify the maximum length of strings. By default I think its set to 250. If you really need to capture longer strings then you could change this setting to a higher value. But remember that this impacts all strings we capture.
Andi
JANUARY 15, 3:00 PM GMT / 10:00 AM ET