I'm developing a web application that has to support lots of simultaneous requests, and I'd like to keep it fast enough. I have now to implement a logging strategy, I'm gonna use log4net, but ... what and how should I log? I mean:
In the requirements appear that the application should cache a couple of things per request, and I'm afraid of the performance impact of that.
Cheers.
Logging can impact your application's performance in two ways. Firstly, the API you are using is probably creating a lot of strings in your application code which can take CPU cycles and create garbage that will need to be collected. Secondly, the logging thread(s) needs to format the string before writing it to disk.
Performance logging is designed to assist when you are troubleshooting performance issues. The reports are generated by a madconfig target and based on performance logs that are gathered by the application server.
Logs contain critical data needed to detect threats, but not all logs are relevant when it comes to a strong detection and response strategy. A strong logging strategy can help you monitor your environment, identify threats faster, and help you determine where you can get the most value from your data.
Logging is a method of tracking and storing data to ensure application availability and to assess the impact of state transformations on performance. Monitoring is a diagnostic tool used for alerting DevOps to system-related issues by analyzing metrics.
Having logging/tracing is extremely valuable - at the very very least you should log errors, or you'll never know about them. Most logging apis let you turn on and off the level of detail you need logged.
Don't worry about performance until it becomes a problem. It's not like you're building moon rockets and wants to see how much weight it can carry by testing it - it's just code, remove the logging statements that flood your logs and recompile if it ever becomes a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With