[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] fenced logsys/cman/ccs setup



On Wed, Jul 02, 2008 at 08:22:54PM +0200, Fabio M. Di Nitto wrote:
> >I was thinking about the error
> >messages we're switching from syslog to logsys.  So, how do we tell logsys
> >to use /var/log/messages for errors and a separate file for debug output?
> 
> Why do you need this? Remember that you are setting a syslog facility. 
> syslog doesn't necessarely send info locally and a certain facility can be 
> directed to a specific file (even remote).
> 
> The normal /var/log/cluster/fenced.log will collect everything locally (if 
> enabled).

OK, I wasn't properly thinking about the modes.

Because our default mode is LOG_MODE_OUTPUT_SYSLOG_THREADED, the file
won't be used by default, and error messages will still go to
/var/log/messages (by logsys using syslog).

If someone edits cluster.conf and just adds cluster/logging/to_file="yes",
without setting cluster/logging/filename, then all log_printf's will go to
the default filename (in addition to other places if other modes are set).
This is the only occasion when the default filename will be used.

Next, to verify how setting/unsetting the modes works.

By default we have LOG_MODE_OUTPUT_SYSLOG_THREADED.
- errors go to /var/log/messages
- debug goes nowhere
- (if debug was set, debug would go to /var/log/messages)

If someone sets to_file="yes", it adds LOG_MODE_OUTPUT_FILE, resulting
in LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE.
- errors go to both /var/log/messages and /var/log/fenced.log
- debug goes nowhere
- (if debug was set, debug would go to both /var/log/messages and
  /var/log/fenced.log)

If someone sets to_file="yes" to_syslog="no", it adds LOG_MODE_OUTPUT_FILE,
removes LOG_MODE_OUTPUT_SYSLOG_THREADED, leaving just LOG_MODE_OUTPUT_FILE.
- errors go to /var/log/fenced.log
- debug goes nowhere
- (if debug was set, debug would go to /var/log/fenced.log)


Say there's a normal setup where no logging is configured, and errors are
going to /var/log/messages.  Then a person wants to turn on debugging and
collect the debug messages in /var/log/fenced.log.  What combination of
to_file, to_syslog, filename, and debug will allow that?  I can't find
any, and I think that would be one of the most common things people would
want.

I don't want to call all this confusing, because I can't offer any better
suggestions, but...  (And we haven't added command line options or
environment variables to the picture yet.)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]