L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
debug.h
1/*
2 * Copyright (C) 2018 Kernkonzept GmbH.
3 * Author(s): Sarah Hoffmann <sarah.hoffmann@kernkonzept.com>
4 *
5 * This file is distributed under the terms of the GNU General Public
6 * License, version 2. Please see the COPYING-GPL-2 file for details.
7 */
8#pragma once
9
10#include <l4/re/util/debug>
11
12namespace Block_device {
13
14class Err : public L4Re::Util::Err
15{
16public:
17 explicit
18 Err(Level l = Normal) : L4Re::Util::Err(l, "") {}
19};
20
21class Dbg : public L4Re::Util::Dbg
22{
23 enum Level
24 {
25 Blk_warn = 1,
26 Blk_info = 2,
27 Blk_trace = 4,
28 Blk_steptrace = 8
29 };
30
31public:
32 Dbg(unsigned long l = Blk_info, char const *subsys = "")
33 : L4Re::Util::Dbg(l, "libblock", subsys) {}
34
35 static Dbg warn(char const *subsys = "")
36 { return Dbg(Blk_warn, subsys); }
37
38 static Dbg info(char const *subsys = "")
39 { return Dbg(Blk_info, subsys); }
40
41 static Dbg trace(char const *subsys = "")
42 { return Dbg(Blk_trace, subsys); }
43
44 static Dbg steptrace(char const *subsys = "")
45 { return Dbg(Blk_steptrace, subsys); }
46};
47
48} // name space
49
L4Re C++ Interfaces.
Definition l4re.dox:17