Linux/Tipps/Gentoo/Installation: Unterschied zwischen den Versionen

Zeile 459: Zeile 459:


Weitere Informationen: http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts
Weitere Informationen: http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts
==Logging aufsplitten==
Quellen: http://gentoo-wiki.com/Syslog-ng, http://forums.gentoo.org/viewtopic-p-4522832-highlight-.html, http://archives.neohapsis.com/archives/postfix/2006-02/0673.html
Standardmäßig wird mit syslog-ng alles nach '''/var/log/messages''' geloggt. Dies kann man auch aufsplitten. In diesem Fall aufplitten in '''mail''', '''mail.info''', '''mail.warn''', '''mail.err''', '''cron.log''', '''messages'''.
'''/etc/syslog-ng/syslog-ng.conf''' (komplett):
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo,v 1.7 2007/08/02 04:52:18 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux
# contributed by Michael Sterrett
options {
        chain_hostnames(off);
        sync(0);
        # The default action of syslog-ng 1.6.0 is to log a STATS line
        # to the file every 10 minutes.  That's pretty ugly after a while.
        # Change it to every 12 hours so you get a nice daily update of
        # how many messages syslog-ng missed (0).
        stats(43200);
};
source src {
    unix-stream("/dev/log" max-connections(256));
    internal();
    file("/proc/kmsg");
};
destination messages { file("/var/log/messages"); };
filter f_messages { level(info..warn)
  and not facility(mail, news, cron); };
log { source(src); filter(f_messages); destination(messages); };
# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };
#cron configuration
destination cron { file("/var/log/cron.log"); };
filter f_cron { facility(cron); };
log { source(src); filter(f_cron); destination(cron); flags(final); };
# mail configuration
destination mail { file("/var/log/mail"); };
filter f_mail { facility(mail); };
log { source(src); filter(f_mail); destination(mail); };
destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };
filter f_info { level(info); };
filter f_warn { level(warn); };
filter f_err { level(err); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
#log { source(src); destination(messages); };
log { source(src); destination(console_all); };
'''/etc/logrotate.d/syslog-ng''' (ergänzen):
/var/log/cron.log {
    sharedscripts
    postrotate
        /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
    endscript
}
/var/log/mail /var/log/mail.warn /var/log/mail.err /var/log/mail.info {
    sharedscripts
    postrotate
        /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
    endscript
}
Dann:
* touch /var/log/mail.warn
* touch /var/log/mail.err
* touch /var/log/mail.info
* /etc/init.d/syslog-ng restart


==Bluetooth==
==Bluetooth==
1.103

Bearbeitungen