# syslog echoes to console

## Horus107

Hello,

since the recent baselayout update all syslog events are echoed to the console which is pretty ugly. For example, when I plug in an usb device all messages produced by the plug in event appear on the console. My system logger is syslog-ng with unchanged configuration. I've also taked a look at the configs of syslog-ng but noticed nothing like that, just the echo to tty12.

What's wrong?

Thanks,

Florian

----------

## Kosmas

Does syslog service run? When syslog deamon is stopped everything is dumped in the current console.

Start it by 

```
/etc/init.d/syslog-ng start
```

and make it start at system startup

```

rc-update add syslog-ng default

```

----------

## dashnu

/etc/conf.d/rc

```

# RC_DMESG_LEVEL sets the level at which logging of messages is done to the

# console.  See dmesg(8) for more info.

RC_DMESG_LOGLEVEL="1"

```

----------

## Horus107

It was already set to 1.

Or what is the value I should set it to?

Florian

----------

## BMRMorph

i tried a little bit but in my eyes there is no way to disable this behavior...

it seem that the RC_DMESG_LOGLEVEL value are ignored.

i think 1 should be nothing is dumped to console exept the panic messages and 8 should be all... 

i could not realy realize a differenz...

btw, i thin the whole baselayout is a little bit strang in the last time...

first the output of interface starting went away (it just dump the net.lo but nothing about eth0, but it is up and running after all) and now the dump of the syslog...it's a little bit contradictory (just my meaning, no reason to flame me...)

----------

## zAfi

yep, I just updated and it happens here as well.

Commented it, nothing changes. And there's no information about that in the manpages of dmesg or syslog-ng. Any ideas??

----------

## Horus107

Has anyone already filed a bug report for that?

----------

## Horus107

Ok, I've filed one: https://bugs.gentoo.org/show_bug.cgi?id=147661

----------

## dashnu

yea I agree it is rather annoying. I tried different settings with no go. dmesg man page does not help..

----------

## XenoTerraCide

```
vi /etc/syslog/syslog-ng.conf
```

```
# By default messages are logged to tty12...

destination console_all { file("/dev/tty12"); }; # << comment this line to keep from logging to console 12

```

 also consider reading this  Gentoo Security Handbook chapter 3 syslog-ng is in section d

[edit]hmm.... I think I read the initial post wrong. and I do not have this symptom that I'm aware of... oh well perhaps someone will find my link interesting.

----------

## dashnu

 *XenoTerraCide wrote:*   

> 
> 
> ```
> vi /etc/syslog/syslog-ng.conf
> ```
> ...

 

I do not think that is the case.. My messages are coming from kernsrc (dmesg) No where in my syslog-ng.conf do I tell kernsrc messages to blast out to the console. I have src going to console_all but these are coming from /proc/kmsg.

Not to mention my logging was working as expected prior to the update.

That may 'fix' the problem but some further explination of why would be nice. Sounds like what you are saying it was not working correctly prior to the update.

**edit** sorry just read your *edit*  :Smile: 

----------

## XenoTerraCide

hmm.... 

is having problems with link I have provided... 

```
source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };

```

 maybe the pipe has something to do with it? the link I provided doesn't have the pipe for /proc/kmsg in their example. also they have kernsrc source on another line... don't know if that would help.

----------

## dashnu

```
#source where to read log

source src { unix-stream("/dev/log"); internal(); };

source kernsrc { file("/proc/kmsg"); };

```

I don't pipe mine. I can't remeber why I ended up changing it but I did for one reason or another.

I think it is all based on the new setting in /etc/conf.d/rc and the code built around it.

----------

## XenoTerraCide

probably... funny that mine hasn't changed.

----------

## BMRMorph

there is a simple workaround for that...

a friend points me on that (thx to TaureC)

the answer is just 2 or 3 lines above in the explanation of this var  :Smile: 

just change the RC_DMESG_LOGLEVEL="1" to RC_DMESG_LEVEL="1"Last edited by BMRMorph on Sun Sep 17, 2006 9:34 pm; edited 1 time in total

----------

## Horus107

The bug seems to be fixed. (at least the report is marked as such)

----------

## BMRMorph

yes, i read it's fixed in the svn version...

but until this gets stable you can edit the conf.d/rc as an bugfix.

----------

