blob: 63534909822c43550fc6c34f2b93a5c4d5c72558 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <seastar/util/log.hh>
#include "common/subsys_types.h"
namespace crimson {
seastar::logger& get_logger(int subsys);
static inline seastar::log_level to_log_level(int level) {
if (level < 0) {
return seastar::log_level::error;
} else if (level < 1) {
return seastar::log_level::warn;
} else if (level < 5) {
return seastar::log_level::info;
} else if (level <= 20) {
return seastar::log_level::debug;
} else {
return seastar::log_level::trace;
}
}
}
|