Opened 3 years ago

Closed 3 years ago

#5053 closed defect (fixed)

Syslog configuration not honoring facility

Reported by: eest Owned by: fdupont
Priority: low Milestone: Kea1.2
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 2
Total Hours: 0 Internal?: no

Description

According to the kea documentation you set the syslog facility by configuring log outputs such as "syslog[:fac]" (https://ftp.isc.org/isc/kea/1.1.0/doc/kea-guide.html#logging-during-startup). It also states the default facility is local0.

From testing I don't think this is actually true. After playing around with setting the log facility both via "KEA_LOGGER_DESTINATION=syslog:fac" in keactrl.conf and configuring "syslog" as the log output in kea.conf, logs still end up in the USER facility (which appears to be the default log4cplus setting).

Tested by adding configuration such as this to syslog.conf:
===
user.* /var/log/testuser
===

... and then setting whatever facility string you wish (any string really) and the log will still end up in the user log file, with the string given as a "facility" name inside the log message.

Subtickets

Change History (7)

comment:1 Changed 3 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea1.2
  • Priority changed from medium to low

Accept 1.2 as Low, per Kea team meeting on 10/20/16

comment:2 Changed 3 years ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

comment:3 Changed 3 years ago by fdupont

  • Add Hours to Ticket changed from 0 to 2
  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing

Done: now SysLogAppender is called correctly. This implies a visible change so a ChangeLog entry, I propose "Logging on syslog now uses correctly the given facility. If none is given the default facility is local0, and with an unrecognized value the log4cplus default user. The program name is the syslog ident."
Ready for review.

comment:4 Changed 3 years ago by tmark

  • Owner changed from UnAssigned to tmark

comment:5 follow-up: Changed 3 years ago by tmark

  • Owner changed from tmark to fdupont

The change works fine.

I don't understand the signifigance of the last sentence in your change log entry "The program name is the syslog ident."

I'm wondering if we don't need a bit more explanation in the admin guide (doc/guide/logging.xml):

17.1.1.4.1.�output (string)

This value determines the type of output. There are several special values allowed here: stdout (messages are printed on standard output), stderr (messages are printed on stderr), syslog (messages are logged to syslog using default name, syslog:name (messages are logged to syslog using specified name). Any other value is interpreted as a filename to which messages should be written. 

comment:6 in reply to: ↑ 5 Changed 3 years ago by fdupont

Replying to tmark:

The change works fine.

I don't understand the signifigance of the last sentence in your change log entry "The program name is the syslog ident."

=> I'll change it for "the syslog openlog() ident parameter is the program name"

I'm wondering if we don't need a bit more explanation in the admin guide (doc/guide/logging.xml):

=> perhaps but it seems nobody complained (at the exception of the bug fixed by this ticket).

comment:7 Changed 3 years ago by fdupont

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged. Closing.

Note: See TracTickets for help on using tickets.