summaryrefslogtreecommitdiffstats
path: root/src/crimson/common/log.h
blob: 132ddd2dc8e7308fe3a5f38f4b454c29ef817dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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;
  }
}
}