LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   logs sent to /dev/console appear on /dev/tty1 (https://www.linuxquestions.org/questions/linux-general-1/logs-sent-to-dev-console-appear-on-dev-tty1-74623/)

lfur 07-21-2003 02:26 PM

logs sent to /dev/console appear on /dev/tty1
 
Hi,

I've included line:
*.* /dev/console

in my syslog.conf, so I could have all the logs displayed in the xconsole when in X. It all works fine untill I reboot. Then all logs that should go to /dev/console appear on prompt (/dev/tty1). I have tried to redirect them to, let's say /dev/tty12 and use the -file option with xconsole but it doesn't work.

Thanks for the support ...

Enjoy

lfur 07-24-2003 08:52 PM

simulate console with tail
 
Since there are no posts, and I haven't foud any proper(?) sollution, I've improvised a bit and came up with my own little console. So here it goes:

since I don't want these logging messages showing up on tty1, but still want to have a console in X with some logs, I have to comment out the line in syslog.conf that does something like this:
whatever.whatever /dev/console

and instead, point the desired logs to some file:
whatever.whatever /var/log/whatever.log

then I have to set up the read permissions to myself, so I can read the file (kind of obvious isn't it):
chmod ??4 whatever.log

and have a xterm (or aterm, eterm or whatever I wil use) execute the:
tail -f /var/log/whatever.log

command. I put it in my xinitrc, so I dont have to run it manualy every time I log in:
xterm -e tail -f /var/log/whatever.log

That's it.

Well, I think it's nothing new to most of you, but it gives me pleasure to share my discoveries. :rolleyes:

Enjoy

Ooops ... almost forgot. The syslogd daemon must be restarted also!

atom 04-02-2006 08:17 AM

I use a little different method myself.

I redirect all log output from apache to /dev/tty12 by a tail command I start in initrc. then I just press ctrl+alt+f12 and I can monitor apache logs from there.

hex1a4 01-08-2008 01:19 PM

Quote:

Originally Posted by lfur (Post 385891)
*.* /dev/console

This should be

*.* /dev/xconsole

To send to ttys make it /dev/tty#


All times are GMT -5. The time now is 08:11 AM.