common: LogEntry: if channel is missing, default to "cluster"

Keeps backward compatibility when there are entities that do not know
what a channel is.  This way we ensure that those messages are logged as
they were expected to be before channels were introduced: to the cluster
log.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: LogMonitor: appropriately expand channel meta variables

We must only expand the log file's channel meta variables upon requiring
a channel's log file.  As we may have a 'default' channel that will
cover all channels, we must wait to expand channels as they come in and
do so if they haven't yet been expanded.  Expanding the 'log_file' in
place would have the unfortunate side effect of expanding, say,

default=/tmp/whatever.$channel.log

to

default=/tmp/whatever.default.log

which would not be what we wanted upon receiving a message that should
go into channel 'foo' -- assuming we specified no such channel in the
options, channel 'foo' should go into '/tmp/whatever.foo.log'.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: LogMonitor: add debug message upon logging to a channel's file

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: LogMonitor: adjust debug messages output levels

Reduce the noise.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: Monitor: log RO admin socket commands on 'debug' level

Reduces the noise caused by read-only operations via the admin socket.
RW commands are still logged at 'info' level.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: Monitor.h: add 'requires_perm()' function to MonCommand struct

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: Monitor: use MonCommand::requires_perm() when checking perms

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
mon: Monitor: log RO commands on 'debug' level, RWX on 'info'

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>