Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-20-2012, 01:32 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Automatic Log Rotation

It would be nice if we could configure logs to be automatically rotated. Even some kind of simplified logrotate options in server options would make the lives of administrators on large servers a lot easier and probably save you a lot of disk space as well (just deleted a 250 MB log file on Era).

Example of server options:

PHP Code:
logrotate=itemlog.txt,trading.txt
logrotate
-itemlog.txt=30,daily,compress # keep 30 old logfiles, rotate daily, gzip old files
logrotate-trading.txt=15,10mb # keep 15 old logfiles, rotate when reaches 10 MB 
Syntax doesn't really matter, but it'd be really nice to not have to download huge files just to check a single line.



This should be a fairly simple addition which would be great for server staff and save Eurocenter quite a bit of storage space (the same file gzipped is about 13 MB).
__________________
Reply With Quote
  #2  
Old 05-24-2012, 08:55 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Wouldn't you be able to load a log file and check how many lines it has, and if it's got more than so many lines, create a new file? That's what I would do.
Reply With Quote
  #3  
Old 05-24-2012, 09:38 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Emera View Post
Wouldn't you be able to load a log file and check how many lines it has, and if it's got more than so many lines, create a new file? That's what I would do.
I don't think you can rename logs via script.
Reply With Quote
  #4  
Old 05-24-2012, 09:39 PM
Stephen Stephen is offline
Boom!
Stephen's Avatar
Join Date: May 2004
Location: San Francisco
Posts: 10,410
Stephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud of
wouldn't SQL logs solve this?
__________________
Reply With Quote
  #5  
Old 05-24-2012, 10:23 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Crow View Post
I don't think you can rename logs via script.
PHP Code:
if (temp.linecount >= MAXLINES) {
  
temp.logsave++;
}
savelog2("whatever_"@temp.logsave@".txt"temp.logsave); 
Wouldn't that be a solution?
Reply With Quote
  #6  
Old 05-24-2012, 10:42 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Emera View Post
PHP Code:
if (temp.linecount >= MAXLINES) {
  
temp.logsave++;
}
savelog2("whatever_"@temp.logsave@".txt"temp.logsave); 
Wouldn't that be a solution?
You can't edit the actual logs though, so they'd build up regardless.
Reply With Quote
  #7  
Old 05-24-2012, 10:47 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stephen View Post
wouldn't SQL logs solve this?
Yes, but they come with additional problems. Logging is not a major problem on Era so I am not really that interested in redoing the entire system, even though it would benefit.

Quote:
Originally Posted by Emera View Post
PHP Code:
if (temp.linecount >= MAXLINES) {
  
temp.logsave++;
}
savelog2("whatever_"@temp.logsave@".txt"temp.logsave); 
Wouldn't that be a solution?
Yes, but I'd like it to gzip and eventually delete old logs as well so that staff don't have to do this.
__________________
Reply With Quote
  #8  
Old 05-24-2012, 10:48 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by DustyPorViva View Post
You can't edit the actual logs though, so they'd build up regardless.
Oh I see. Sucks
Reply With Quote
  #9  
Old 05-24-2012, 10:49 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
Yes, but I'd like it to gzip and eventually delete old logs as well so that staff don't have to do this.
Ah :/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.