JAY6390 wrote:Would log files that are named the current date and time (including microseconds) be a better way to handle it then? The probability of the logs being written twice to the exact same name, and perhaps having an IP filtering of some sort, so that vQmod only runs the logging when it is a certain user making the scripts execute, to limit your log files going nuts and filling up your web space
I had a few ideas that I tried
- appending the same log if the updates were within 10 secs. But the waythe current logging is, it is just confusing, and if you loaded a page that takes 5 secs to load.. then when there is 2 secs left of the 10 sec timer, the next 10 sec session would end up overwriting the log anyway so that wasn't working.
- appending the $_SERVER['REQUEST_URL'] to the filename so you knew exactly what page was loading. This worked "ok" but the names were quite long depending on the url and wasn't in the mood to create a cleanup process as there could be a log for every single controller or callback which would result in a lot of logs.
- Creating a new log with a number on the end, similar to the first idea, but instead of appending, just create vqmod1.log, vqmod2.log, vqmod3.log if the class was called within the same 10 seconds. Then overwrite from the start so you'd likely never go higher than vqmod5.log
Timestamp and IP might be good... maybe a new log for each minute.. and auto clean so that no more than 10 logs can exist.
In the next version I was planning on changing the logging to be cleaner. Like one or two lines for each operation to make it easier to read just cleaner overall.. that might make the choice of using multiple logs easier. But open to any ideas.