3 ms·
I could not live without a log file. You should create a log file (text file is fine), where you write as much as possible about the program flow: user logged
by idiocrat 5y ago
I could not live without a log file.
You should create a log file (text file is fine), where you write as much as possible about the program flow: user logged in, user navigates ..., request started, query submitted with parameters, query responded with 1100 records, result processed, result formatted, result delivered, finished request.
The log should be appropriately detailed.
Correlate the log entries with the user ID, session ID, request ID, thread ID, etc, whatever appropriate.
Timestamp the log entries with millisecond times (2021-12-27 14:21:33.512)
Watch and observe the request flows over period of days.
Perhaps you will see where the problems are.
1) Too many records fetched from DB.
2) Too slow DB fetch (missing indexes)
3) Cold DB caches
4) Some exponential loops
Instead of text file, you can use a structured log, but a simple text file will quickly give you results.
- pototo666 5y agoThank you sir. I only log program exception. Your advice really makes wonder why I have not done what you suggested at first.