Questions tagged [syslog]

Syslog is a standard for logging program messages.

Syslog is a standard for logging program messages.Wikipedia

1162 questions
151
votes
12 answers

How to configure logging to syslog in Python?

I can't get my head around Python's logging module. My needs are very simple: I just want to log everything to syslog. After reading documentation I came up with this simple test script: import logging import logging.handlers my_logger =…
thor
  • 2,204
  • 3
  • 20
  • 23
122
votes
7 answers

How to check syslog in Bash on Linux?

In C we log this way: syslog( LOG_INFO, "proxying %s", url ); In Linux how can we check the log?
kern
  • 2,295
  • 4
  • 17
  • 15
73
votes
9 answers

Reading syslog output on a Mac

I have a program that was written for linux and I am trying to build and run it on my MacOS 10.5 machine. The program builds and runs without problem, however it makes many calls to syslog. I know that syslogd is running on my mac, however I can't…
arigreen
73
votes
3 answers

How do you read a segfault kernel log message

This can be a very simple question, I'm am attempting to debug an application which generates the following segfault error in the kern.log kernel: myapp[15514]: segfault at 794ef0 ip 080513b sp 794ef0 error 6 in myapp[8048000+24000] Here are my…
Sullenx
  • 731
  • 1
  • 6
  • 3
49
votes
4 answers

Ubuntu: large syslog and kern.log files

Logging into my Ubuntu machine, I get a warning that I am running out of disk space. Tracing back, I find that it is the syslogs, especially the kern.log(s) that are eating up my 1TB disk. -rw-r----- 1 syslog adm 240G Feb 25 14:22…
andwjstks
  • 643
  • 1
  • 6
  • 7
38
votes
3 answers

Multiline log records in syslog

So I've configured my Python application to log to syslog with Python's SysLogHandler, and everything works fine. Except for multi-line handling. Not that I need to emit multiline log records so badly (I do a little), but I need to be able to read…
Shay Rojansky
  • 15,357
  • 2
  • 40
  • 69
33
votes
3 answers

Does Syslog really have a 1KB message limit?

It seems Syslog has a 1KB message limit. Is this hardcoded into the Syslog protocol, or is this a parameter that can be set for each server? I am hoping the article I read was out of date, so if you have any info please share.
JL.
  • 78,954
  • 126
  • 311
  • 459
28
votes
4 answers

Redirect C++ std::clog to syslog on Unix

I work on Unix on a C++ program that send messages to syslog. The current code uses the syslog system call that works like printf. Now I would prefer to use a stream for that purpose instead, typically the built-in std::clog. But clog merely…
kriss
  • 23,497
  • 17
  • 97
  • 116
23
votes
2 answers

Confused with syslog message format

I am a bit confused about syslog message format. I have to write a program that parses syslog messages. When I read what I get in my syslog-ng instance I get messages like this: Jan 12 06:30:00 1.2.3.4 apache_server: 1.2.3.4 - -…
qwix
  • 251
  • 1
  • 2
  • 3
21
votes
3 answers

syslog.syslog vs SysLogHandler

I'm looking at how to log to syslog from within my Python app, and I found there are two ways of doing it: Using syslog.syslog() routines Using the logger module SysLogHandler Which is the best option to use, advantages/disadvantages of each one,…
Juancho
  • 629
  • 7
  • 17
20
votes
3 answers

What is the most modern way to log to syslog using a java.util.logging handler?

I am specifically looking for the most up to date, modern SysLogHandler for java.util.logging. I have found a few that date back to 2001 - 2003, mostly un-supported now. I know that syslog is a pretty static service, I am wondering before I write…
user177800
20
votes
6 answers

Prevent forwarding of systemd service logs to syslog without affecting other service logs sent to syslog

My computer runs serveral java processes as systemd services.The systemd logs get accumulated in the syslog eventually leading to low disk space . How to re-direct the logs started by systemd services towards /dev/null so that it does not accumulate…
achilles
  • 536
  • 5
  • 16
20
votes
2 answers

Open Source Syslog Daemon for Windows

Can anyone recommend an open source Syslog Daemon for Windows (specifically Windows 2008 64bit). Thanks
chrisyunker
  • 541
  • 1
  • 3
  • 9
20
votes
1 answer

Suppress log entry for single sudo commands

For server monitoring, we execute couple of commands with password-less sudo every minute. This fills the server logs. sudo: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/foo/bar Can I prevent these entries? The options NOLOG_INPUT and…
StephenKing
  • 36,187
  • 11
  • 83
  • 112
19
votes
3 answers

How to setup SysLogHandler with Django 1.3 logging dictionary configuration

I'm having no luck finding any information on setting up syslog logging with Django 1.3 dictionary configuration. The Django documents don't cover syslog and the python documentation is less than clear and doesn’t cover dictionary config at all. …
Rob Osborne
  • 4,897
  • 4
  • 32
  • 43
1
2 3
77 78