]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: LogMonitor: appropriately expand channel meta variables
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 19 Sep 2014 16:24:49 +0000 (17:24 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 22 Sep 2014 16:36:29 +0000 (17:36 +0100)
commit3760bc1b460fb81effdb18e79a207400a1d41bbf
tree6df60c2ba180c0e4f6612e383f2e68cad4d83857
parent6c378aebcbae49b8909ba598b307add7b7a23082
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>
src/mon/LogMonitor.cc
src/mon/LogMonitor.h