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

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

On Wed, 2 Jul 2008, David Teigland wrote:

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

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).

The defaults in the other daemons are LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE | LOG_MODE_OUTPUT_STDERR. Better catch them all than none. I might have missed the email where you said that LOG_MODE_OUTPUT_SYSLOG_THREADED should be the only default, but i think it's better to spit out a few more messages if we can't configure according to user whishes than hiding.

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.

Not if we use the built-in defaults like i did for the other bits.

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

- errors go to /var/log/messages
- debug goes nowhere
- (if debug was set, debug would go to /var/log/messages)

it might not be /var/log/messages. This is very distro specific.

If someone sets to_file="yes", it adds LOG_MODE_OUTPUT_FILE, resulting
- 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


If someone sets to_file="yes" to_syslog="no", it adds 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.

Well this only make sense if by default we log only to syslog.

 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

When you enable debugging in other daemons, the messages go everywhere. Not just in one specific file.

I don't want to call all this confusing, because I can't offer any better
suggestions, but...

I think what you are trying to tell me is that you would like to see debug messages going to a specific file rather than to the default LOG_MODE_OUTPUT. If i understand you right, this is not an option right now and personally i don't see the need of it.

(And we haven't added command line options or
environment variables to the picture yet.)

I think you misunderstood this cmdlin + envvar thing. I am not saying we need to be able to configure _everything_.. not at all. Only the equivalent of debug=on/off.

something like this basically (very pseudo code):

  -D debug = 1;

if (getenv(SYSTEM_DEBUG))
  debug = 1;

then later in get_logsys_config_data(int *debug)

if (!*debug) {
   check ccs etc...

very simple.. i didn't plan nor think to add all config options.. not at all... sorry if that was not clear from my side.


I'm going to make him an offer he can't refuse.

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