Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance logging library [closed]

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?

like image 952
Books Avatar asked Dec 19 '10 15:12

Books


People also ask

Which logger is best for Nodejs?

Winston. If you want to store your error log in a remote location or separate database, Winston might be the best choice because it supports multiple transports. Alternatively, Log4js supports log streams, like logging to a console, and log aggregators like Loggly (using an appender).

Which is the best logging framework .NET core?

NLog. NLog is one of the most popular, and one of the best-performing logging frameworks for . NET. Setting up NLog is fairly simple.

What is the logging library?

A logging library (or logging framework) is code that you embed into your application to create and manage log events. Logging libraries provide APIs for creating, structuring, formatting, and transmitting log events in a consistent way. Like agents, they're used to send events from your application to a destination.

Does logging affect performance?

Logs Can Have a Strong Impact on Stability, Performance, and Garbage Collection.


1 Answers

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) alt text

Ending method call

alt text

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: alt text

like image 147
Restuta Avatar answered Sep 20 '22 02:09

Restuta