Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
maybe not a bug however overtime I go to » Control Panel » Logs » View SQL Errors
and want to find a log I must search for the date as they come randomly.

I think they probably could be sorted by "date". There seems not to be any structure for this
also it might be good to sort them in size.

se example below from my site

20140402_mysql.log 3KB [View] · [Remove]
20131109_mysql.log 2KB [View] · [Remove]
20140321_mysql.log 22KB [View] · [Remove]
20140522_mysql.log 3KB [View] · [Remove]
20150201_mysql.log 810B [View] · [Remove]
20141025_mysql.log 628B [View] · [Remove]
20140921_mysql.log and it keep going like this.

Just wonder
cheers


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Well it is screwy.
Always has been
But it appears to be sorted by date then month and ignore years.

I do know if you let the errors accumulate it becomes very difficult to sort them out in chronological order.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
OK Hope the admin of this site see this topic. I will have to delete old logs in order to keep it simple then.
thanks Ruben you are always giving good feedback.
cheers


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
I'm not the admin of this site, nor do I have any powers on this site, but to fix your issue in 7.5.9 and older:

in admin/logs.php
FIND:
Code
}
@closedir($dir);

REPLACE WITH:
Code
}
rsort($log);
@closedir($dir);

Done.


EDITED TO ADD:
If you want it to sort in ascending order, instead of using "rsort($log);", use "sort($log);"

I prefer my logs showing the most recent at top, but that can be a nuisance to deal with if you have hundreds of logs you're trying to clear out, without removing just the last 30 or so logs. Though, you really should just find out what is causing the SQL error logs and resolve the issue, then keep checking them and fixing as needed.

Sometimes error entries cannot be avoided -- ex; you're on an overloaded shared server and a script sometimes times-out or runs out of shared memory (usually the "search" script). That will create a log entry, even though the code is correct and is optimized. The server is just not giving it enough of what it needs to complete.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I find it funny that I just told Isaac the other day that I hated how the logging system worked, then he started working on it, then someone else mentioned that they didn't how it worked either... Great minds, I suppose. tongue


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 987
Likes: 24
Old Hand
Old Hand
Joined: Jun 2006
Posts: 987
Likes: 24
Thanks I might try that sort option. When they implement it in the software then they might do it so one can click on the header to sort ascending or opposite.

Giz yes thats's funny! :grin


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 686 guests, and 131 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)