# Monthly configuration file for rot[t]log
# Allowed values only between two { }
#
#
#
# This is a sample configuration file. Fit to your needs.


# list of logs to be rotated:
/var/adm/log.daemon,/var/adm/log.debug {
           # To create a new log file with perms, own and group specified
           create 600 root root 
           # These actions will be performed after archived logfile 
           postrotate
               /sbin/killall -HUP syslogd
           endscript
           # Don't compress yet logfile (see README)
           delaycompress
           # Let in newlogfile events logged from first day of this month
           logpart "#1 day"
}

/var/adm/messages {
        # Store compressed messages in $packdir/messages
        # ($packdir is specified in main rc file)
	storedir messages
	# These actions will be performed before archive logfile
	prerotate
		/sbin/killall -STOP myprogram
	endscript
	# Rotate logs with extensions from .1 to .5
        rotate 5
        # Don't rotate log if it's empty
	notifempty
}

/var/adm/wtmp,/var/adm/lastlog {
           # To create a new log file with perms, own and group specified
           create 644 root root
           # Don't compress yet logfile (see README)
           delaycompress
           # Send notification e-mail message to a different user from 
           # global touser
           touser "admin@example.net"
}

# Following definitions will be available for all logfiles stored in /var/log
# dir and beginning by log.a
/var/log/log.a* {

     # Tells to rottlog to descend two levels of depth to find files
     # beginning my log.a
     maxdepth 2

     # Use of meta-variables. For each processed file storedir will be 
     # expanded, so will be used 2002/04/log.auth, 2002/04/log.apache, ....
     # to store compressed archived logs
     storedir @YEAR/@MONTH/@BASENAME

     # Tells to rottlog to make new dirs if does not yet exsits with
     # permissions 0640, owner root and group loggers
     # See README for more details
     createdir 0640 root loggers
  
     # Rotate files with a 6 month period
     rotate 6

     # Flag to use only with an ext2 filesystem. Add append-only attribute
     # to logfile
     append-only

     # Don't rotate if logfile is smaller than 1 Megabyte
     size 1M
}

