The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Installing a Logger"
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
In case you ever need to view important system messages, it is a wise idea to install a system logger. System loggers create log files that contain system messages, and stores these logs in < | In case you ever need to view important system messages, it is a wise idea to install a system logger. System loggers create log files that contain system messages, and stores these logs in <code>/var/log</code>. Several different loggers exist. Listed below are some of the more commonly used loggers: | ||
* ''' | * '''{{Package|app-admin/metalog}}''' - "Metalog is a modern replacement for syslogd and klogd. The logged messages can be dispatched according to their facility, urgency, program name and/or Perl-compatible regular expressions." This is a good, light-weight logger that is often used for desktop systems. ([http://metalog.sourceforge.net Metalog homepage]) | ||
* ''' | * '''{{Package|app-admin/syslog-ng}}''' - "syslog-ng is the trusted log management infrastructure for hundreds of thousands of users worldwide. Organizations use syslog-ng to reliably and securely collect, process and store log messages from across their IT environments." syslog-ng is often used when more advanced logging functionality is required, and is highly customizable. ([http://balabit.com/network-security/syslog-ng Syslog-ng homepage]) | ||
* ''' | * '''{{Package|app-admin/rsyslog}}''' - "rsyslog is an alternative logger to syslog-ng and offers many benefits over syslog-ng. rsyslog is also the default logger for the latest versions of Red Hat Enterprise Linux, as well as many other Linux distributions." ([http://wiki.archlinux.org/index.php/rsyslog Arch wiki page]) | ||
== Installation and adding to runlevel == | == Installation and adding to runlevel == | ||
To install a logger, run the following command: | To install a logger, run the following command: | ||
<console> | <console> | ||
# ##i## emerge | ###i## emerge metalog | ||
These are the packages that would be merged, in order: | These are the packages that would be merged, in order: | ||
Line 16: | Line 16: | ||
Total: 1 package (1 new), Size of downloads: 353 kB | Total: 1 package (1 new), Size of downloads: 353 kB | ||
Would you like to merge these packages? [Yes/No] | Would you like to merge these packages? [Yes/No] ##i## yes | ||
</console> | </console> | ||
After installing the logger, we have to add its initialization script to RC’s default runlevel. The default runlevel, defined at /etc/runlevels/default, contains symbolic links to all system initialization scripts that are run by default. To add the logger to the runlevel and then start the logger, run the following: | After installing the logger, we have to add its initialization script to RC’s default runlevel. The default runlevel, defined at <code>/etc/runlevels/default</code>, contains symbolic links to all system initialization scripts that are run by default. To add the logger to the runlevel and then start the logger, run the following: | ||
<console> | <console> | ||
# ##i## rc-update add metalog default | ###i## rc-update add metalog default | ||
* service metalog added to runlevel default | * service metalog added to runlevel default | ||
# ##i## rc | ###i## rc | ||
* Starting metalog ... | * Starting metalog ... | ||
</console> | </console> | ||
== Stopping the service == | == Stopping the service == | ||
If | If you need to stop the service manually, you can run its initialization script directly from <code>/etc/init.d</code>: | ||
<console> | <console> | ||
# ##i##/etc/init.d/metalog stop | ###i## /etc/init.d/metalog stop | ||
* Stopping metalog ... | * Stopping metalog ... | ||
</console> | </console> | ||
[[Category:System]] | [[Category:System]] |
Latest revision as of 23:49, September 18, 2014
Introduction
In case you ever need to view important system messages, it is a wise idea to install a system logger. System loggers create log files that contain system messages, and stores these logs in /var/log
. Several different loggers exist. Listed below are some of the more commonly used loggers:
- app-admin/metalog - "Metalog is a modern replacement for syslogd and klogd. The logged messages can be dispatched according to their facility, urgency, program name and/or Perl-compatible regular expressions." This is a good, light-weight logger that is often used for desktop systems. (Metalog homepage)
- No results - "syslog-ng is the trusted log management infrastructure for hundreds of thousands of users worldwide. Organizations use syslog-ng to reliably and securely collect, process and store log messages from across their IT environments." syslog-ng is often used when more advanced logging functionality is required, and is highly customizable. (Syslog-ng homepage)
- No results - "rsyslog is an alternative logger to syslog-ng and offers many benefits over syslog-ng. rsyslog is also the default logger for the latest versions of Red Hat Enterprise Linux, as well as many other Linux distributions." (Arch wiki page)
Installation and adding to runlevel
To install a logger, run the following command:
root # emerge metalog These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] app-admin/metalog-3-r1 USE="unicode" 353 kB Total: 1 package (1 new), Size of downloads: 353 kB Would you like to merge these packages? [Yes/No] yes
After installing the logger, we have to add its initialization script to RC’s default runlevel. The default runlevel, defined at /etc/runlevels/default
, contains symbolic links to all system initialization scripts that are run by default. To add the logger to the runlevel and then start the logger, run the following:
root # rc-update add metalog default * service metalog added to runlevel default root # rc * Starting metalog ...
Stopping the service
If you need to stop the service manually, you can run its initialization script directly from /etc/init.d
:
root # /etc/init.d/metalog stop * Stopping metalog ...