Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-2010, 03:21 AM
Translation Moderator
 
Posts: 64
Default [SOLVED] Extend the rotation of mailbox.log

Hello Forum,

I need to change somehow the way log4j does the rotation on at least the mailbox.log file, currently i have some 10 days but I need to have at least 30 days, if possible we want to have 90 days.

How do I change this? I tried to search in the forums and to google but did not really found helpful information on this regard,

thanks
Reply With Quote
  #2 (permalink)  
Old 02-09-2010, 03:30 AM
Translation Moderator
 
Posts: 64
Default additional info

I tried to put this in the conf/log4j.properties file:
log4j.appender.LOGFILE.MaxBackupIndex=30

but then I get this message:

zimbra@mailserver:~/conf$ zmprov -v
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.


....



best regards
Ray
Reply With Quote
  #3 (permalink)  
Old 02-09-2010, 03:42 AM
Translation Moderator
 
Posts: 64
Default ok, i'l got a little further

After reading the online documentation to log4j it seems like there is nothing which deletes old logfiles in log4j on rotation, so i dug a little further and i come across the crontab of the zimbra user,

there I found:

# ZIMBRASTART -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRAEND
#
# Log pruning
#
30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
35 2 * * * find /opt/zimbra/log/ -type f -name \*.out.???????????? -mtime +8 -exec rm {} \; > /dev/null 2>&1


So, there it is where my logfiles get deleted, but how to proceed from there? I should not edit anything here, is this autogenerated? is the value +8 editable somewhere? In the LDAP?

If not, do I have to take care to check on every upgrade ???

thanks for any help,

best
Ray
Reply With Quote
  #4 (permalink)  
Old 02-09-2010, 04:04 AM
Translation Moderator
 
Posts: 64
Default for the time being

Ok, for the time being I changed the crontab to the following:

# ZIMBRASTART -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRAEND
#
# Log pruning
#
30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -and ! -name mailbox.log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
30 2 * * * find /opt/zimbra/log/ -type f -name mailbox.log\* -mtime +30 -exec rm {} \; > /dev/null 2>&1


means that all logfiles get rotated on their 8 day scheme, but mailbox.log will stay for 30 days ...

I do hope someone can tell me how to do this the proper way thought ...

best
Ray
Reply With Quote
  #5 (permalink)  
Old 02-09-2010, 04:11 AM
Zimbra Consultant & Moderator
 
Posts: 19,602
Default

[SOLVED] Increase number of logs to keep .... and yes, you will need to change that on every upgrade.
__________________
Regards


Bill
Reply With Quote
  #6 (permalink)  
Old 02-09-2010, 04:31 AM
Translation Moderator
 
Posts: 64
Default Did not find that

Hi,

interesting, i was searching within the last 2 weeks quite a bit in the forum but did not find this message ...

Would have helped me out in the first place ...

best
Ray
Reply With Quote
  #7 (permalink)  
Old 02-09-2010, 04:32 AM
Translation Moderator
 
Posts: 64
Default resolved

I'l set this to resolved for now, though wishing someone finds out a better method ...

best
Ray
Reply With Quote
  #8 (permalink)  
Old 02-09-2010, 04:39 AM
Zimbra Consultant & Moderator
 
Posts: 19,602
Default

Quote:
Originally Posted by Hatrix View Post
I'l set this to resolved for now, though wishing someone finds out a better method ...
If you would like some option to change the retained period of the log files then I'd suggest you file an RFE in Bugzilla Main Page - Zimbra, that would be the appropriate place for it.
__________________
Regards


Bill
Reply With Quote
  #9 (permalink)  
Old 02-10-2010, 03:18 AM
Translation Moderator
 
Posts: 64
Default RFE for more days worth of logs

Hi,

i took your advice at heart and created a bug/feature request:

Bug 44554 – log4j configurable amount of days to keep logs.

maybe some of the people concerned with this bug should care to vote.

best regards
Ray
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.