开发者

Performance logging library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question开发者_如何学Python so it can be answered with facts and citations.

Closed 5 years ago.

Improve this question

I want to start monitoring the performance of my applications by logging business events. I was looking for something similiar to log4net or other logging libraries, but tailored for performance/health monitoring.

My goal is to publish these business events using performance counters, but I don't really feel like it's a good idea to litter my code with performance counter code. Just like how log4net abstracts logging out, is there an existing library that abstracts performance/health monitoring to its own library?


You definitely should try Gibraltar. You can combine it with PostSharp and your performantce monitoring will be a piece of cake. Just look into the following code example:

    [GTrace]
    public Connection ConnectToServer(Server server)
    {
        ConnectionStatus connectionStatus = server.TryConnect();
        return connectionStatus;
    }

And the result in log will look like the following:

Starting method call (you can see passed arguments)

Performance logging library [closed]

Ending method call

Performance logging library [closed]

No crap in code, only thing you need is one attribute. Attrubutes can be used for whole project excluding not needed methods, on namespases, classes or just on any methos you need. Enjoy!

Edit Forgot to mention that Gibraltar has a very rich client and support any metrics you ever need, it's just too powerfull:

Performance logging library [closed]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜