mirror of
https://github.com/ceph/ceph
synced 2025-01-19 01:21:49 +00:00
log: dump logging levels in crash dump
So you know what you are/are not seeing. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
d3c76f754f
commit
de524abdb1
@ -258,6 +258,27 @@ void Log::dump_recent()
|
||||
EntryQueue old;
|
||||
_log_message("--- begin dump of recent events ---", true);
|
||||
_flush(&m_recent, &old, true);
|
||||
|
||||
char buf[4096];
|
||||
_log_message("--- logging levels ---", true);
|
||||
for (vector<Subsystem>::iterator p = m_subs->m_subsys.begin();
|
||||
p != m_subs->m_subsys.end();
|
||||
++p) {
|
||||
snprintf(buf, sizeof(buf), " %2d/%2d %s", p->log_level, p->gather_level, p->name.c_str());
|
||||
_log_message(buf, true);
|
||||
}
|
||||
|
||||
sprintf(buf, " %2d/%2d (syslog threshold)", m_syslog_log, m_syslog_crash);
|
||||
_log_message(buf, true);
|
||||
sprintf(buf, " %2d/%2d (stderr threshold)", m_stderr_log, m_stderr_crash);
|
||||
_log_message(buf, true);
|
||||
sprintf(buf, " max_recent %9d", m_max_recent);
|
||||
_log_message(buf, true);
|
||||
sprintf(buf, " max_new %9d", m_max_new);
|
||||
_log_message(buf, true);
|
||||
sprintf(buf, " log_file %s", m_log_file.c_str());
|
||||
_log_message(buf, true);
|
||||
|
||||
_log_message("--- end dump of recent events ---", true);
|
||||
|
||||
pthread_mutex_unlock(&m_flush_mutex);
|
||||
|
@ -23,6 +23,8 @@ class SubsystemMap {
|
||||
std::vector<Subsystem> m_subsys;
|
||||
unsigned m_max_name_len;
|
||||
|
||||
friend class Log;
|
||||
|
||||
public:
|
||||
SubsystemMap() : m_max_name_len(0) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user