Project

General

Profile

Actions

Feature #676

closed

Syslog support

Added by Jochen Schalanda about 13 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Smart-Proxy should be able to log to a standard syslog daemon.

Especially in an IT landscape with a large number of nodes you usually have a centralized logging infrastructure and Smart-Proxy should be able to use that if possible. Currently it only supports the output channels of Ruby's Logger class, which is a plain text file or STDOUT.


Related issues 3 (1 open2 closed)

Related to Smart Proxy - Feature #8006: Implement logging to stdout/stderrClosedLukas Zapletal10/21/2014Actions
Related to Smart Proxy - Refactor #11323: Refactor PID writing, interrupt trap and daemon loggingClosedLukas Zapletal08/11/2015Actions
Related to Katello - Feature #21807: Smart proxy status does not report pulp errorsNew11/29/2017Actions
Actions #1

Updated by Ohad Levy almost 13 years ago

Syslog support in Ruby seems farily simple.

we can probably replace the custom logger with syslog directly:

require 'syslog'

Syslog.open("foreman-proxy")
Syslog.err "something bad happened" 
Syslog.close
Actions #2

Updated by Benjamin Papillon over 11 years ago

I clicked on the wrong button to vote. Too bad I didnt find how to revoke my vote :(

Actions #3

Updated by cristian falcas almost 10 years ago

I was wandering if this was implemented after all or not?

Actions #4

Updated by Lukas Zapletal almost 10 years ago

  • Description updated (diff)

Not yet, patch is welcome.

Actions #5

Updated by Lukas Zapletal over 9 years ago

  • Related to Feature #8006: Implement logging to stdout/stderr added
Actions #6

Updated by Byron Miller over 8 years ago

  • Status changed from New to Resolved

Foreman Proxy now allows you to define STDOUT as a log output in /etc/foreman-proxy/settings.yml. On systemd this will output to /var/log/messages or whatever you have defined for the service in systemd.

Systemd manpage:

StandardOutput=
Controls where file descriptor 1 (STDOUT) of the executed processes is connected to. Takes one of inherit, null, tty, journal, syslog, kmsg, journal+console, syslog+console, kmsg+console or socket.

inherit duplicates the file descriptor of standard input for standard output.

null connects standard output to /dev/null, i.e. everything written to it will be lost.

tty connects standard output to a tty (as configured via TTYPath=, see below). If the TTY is used for output only, the executed process will not become the controlling process of the terminal, and will not fail or wait for other processes to release the terminal.

journal connects standard output with the journal which is accessible via journalctl(1). Note that everything that is written to syslog or kmsg (see below) is implicitly stored in the journal as well, the specific two options listed below are hence supersets of this one.

syslog connects standard output to the syslog(3) system syslog service, in addition to the journal. Note that the journal daemon is usually configured to forward everything it receives to syslog anyway, in which case this option is no different from journal.

kmsg connects standard output with the kernel log buffer which is accessible via dmesg(1), in addition to the journal. The journal daemon might be configured to send all logs to kmsg anyway, in which case this option is no different from journal.

journal+console, syslog+console and kmsg+console work in a similar way as the three options above but copy the output to the system console as well.

socket connects standard output to a socket acquired via socket activation. The semantics are similar to the same option of StandardInput=.

This setting defaults to the value set with DefaultStandardOutput= in systemd-system.conf(5), which defaults to journal.

Actions #7

Updated by Lukas Zapletal over 8 years ago

  • Related to Refactor #11323: Refactor PID writing, interrupt trap and daemon logging added
Actions #8

Updated by Lukas Zapletal over 6 years ago

  • Related to Feature #21807: Smart proxy status does not report pulp errors added
Actions

Also available in: Atom PDF