Feature #311

add config option to disable logging into the daemon log file

Added by dnsmichi about 4 years ago. Updated over 3 years ago.

Status:ResolvedStart date:02/27/2010
Priority:NormalDue date:
Assignee:elagon% Done:

100%

Category:Configuration
Target version:1.2 (Stable)

Description

changes behavior, needs to be discussed.

-------- Original Message --------
Subject:     [Nagios-devel] use_syslog patch
Date:     Fri, 5 Jun 2009 11:37:41 -0600
From:     Steven D. Morrey <smorrey@ldschurch.org>
Reply-To:     Nagios Developers List <nagios-devel@lists.sourceforge.net>
To:     nagios-devel@lists.sourceforge.net <nagios-devel@lists.sourceforge.net>

Hi Everyone,

The patch attached adds another option to use_syslog.
This option is 2 and will cause it to log to syslog only, thus preventing nagios.log from being written.
Beware:  Setting this option will break ANYTHING that requires the log to function this includes history browsing,  so use it at your own risk.

I have created 2 versions, one for nagios-2.12 and one for nagios-3x (todays cvs)
Enjoy!

Sincerely,
Steve

nagios-3x-use_syslog.patch Magnifier (2.4 KB) dnsmichi, 02/27/2010 06:43 pm


Related issues

Related to Docs - Feature #755: logging options for daemon Closed 08/30/2010

Associated revisions

Revision d80c3ac8
Added by elagon over 3 years ago

New config option to enable/disable logging in to the daemon log file

fixes #311

History

#1 Updated by dnsmichi almost 4 years ago

since we already have the syslog facility, we need to force attention in changing use_syslog sth other than 0 or 1 which could cause confusion.

it might be good to just add a new config option "no_daemon_log=1" if icinga.log shouldn't be written.

#2 Updated by Meier almost 4 years ago

dnsmichi wrote:

since we already have the syslog facility, we need to force attention in changing use_syslog sth other than 0 or 1 which could cause confusion.

it might be good to just add a new config option "no_daemon_log=1" if icinga.log shouldn't be written.

i don't see why this should cause confusion, also it does not affect any previous configurations. before you implement more and more config options the config parser should be revamped.
i would apply this patch.

#3 Updated by dnsmichi almost 4 years ago

  • Category changed from Other to Configuration
  • Status changed from Feedback to New
  • Priority changed from Low to Normal

you are right on that, it does not really matter in this regard.

but i would consider setting the default config option to 2 for future releases (which is incompatible to older versions).

#4 Updated by Meier almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Meier
  • Target version set to 1.0.3
  • % Done changed from 0 to 90

I adapted the patch and pushed it in: 5effc34132acd5753d52efe2f5194b7847bfd2b2

Please consider it for rel 1.0.3

#5 Updated by elagon almost 4 years ago

I really prefer the idea of "no_daemon_log=1"
If I will modify your commit with this option instead will it be ok with you?
The think I don't like very much is using the boolean variable "use_syslog" for more than one it's yes|no value, I think users will be confused about this.

#6 Updated by Meier almost 4 years ago

go ahead, i don't mind if you rewrite it

#7 Updated by Meier over 3 years ago

  • Assignee deleted (Meier)
  • % Done changed from 90 to 0

#8 Updated by Meier over 3 years ago

  • Target version deleted (1.0.3)

#9 Updated by elagon over 3 years ago

  • Assignee set to elagon

#10 Updated by elagon over 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

fixed in commit 157743f679961a22ebe8036fec72a2e111a62efa
the option is 'use_daemon_log' and default is 1 (true)

#11 Updated by dnsmichi over 3 years ago

  • Status changed from Resolved to Assigned

tests and output? during testing period before a release this needs to be extensively clarified for the rest, in order to adapt test cases.

this is a feature, not a bugfix - can this run into 1.0.3?

in that case, features require a docs issue too.

#12 Updated by elagon over 3 years ago

Sorry, forgot about that.
I tested it on Ubuntu Server 8.04 32bit and Ubuntu Desktop 10.04 32bit.
I think we can postpone it, it's not a feature essential for 1.0.3
For the doc issue I always prefere to see the commit in master first because it can be refused and in that case the doc issue was done for nothing :)

#13 Updated by dnsmichi over 3 years ago

  • Target version set to 1.2 (Stable)

#14 Updated by dnsmichi over 3 years ago

  • Status changed from Assigned to Resolved

tested, works as expected. changed some identing and updated changelog.

#15 Updated by elagon over 3 years ago

must open an issue for the docs

#16 Updated by dnsmichi over 3 years ago

  • Subject changed from use_syslog patch to add config option to disable logging into the daemon log file

Also available in: Atom PDF