Thanks Tinkster!
Thanks jay73!
Yes, my distro uses syslog-ng.
And, I got it!
For other Linux newbies who have same problem and want to do kernel programming:
syslogd or syslog-ng (depend of your distro) controls log messages; read manual for these. There is configuration file
syslog-ng.conf (syslogd.conf) in the directory /etc/syslog-ng/ (etc/sysylogd/). Don't edit this file. Edit file syslog-ng.conf.in to control messages for your needs.
In section of file syslog-ng.conf.in:
destination messages { file("/var/log/messages"); }; -> describes where messages are stored
replace "/var/log/message" with your file's path where you want to store messages.
In order for this change to take effect you need to kill syslog-ng. To see syslog-ng process ID (PID) type "ps -ef | grep log". Then type "kill <syslog-ng PID>". Now, start syslog-ng with "syslog-ng -f /etc/syslog-ng/syslog-ng.conf.in" (now, messages control by this file). If your system reports some error messages after typed command, compare files syslog-ng.conf and syslog-ng.conf.in in named line in error messages.
Note:
If you want to display kernel messages in your file, you need to kill klogd (after you killed syslog-ng) to take changes made in syslog-ng.conf.in. To kill klogd use the same procedure as the one when you killed syslog-ng. Now, after the syslog-ng has started, start klogd with "klogd -c <messages level>" (see manual klogd for information about messages level).
Am I right, Tinkster?
