blob: b0678e273bc31797bfe4036cf53063b8c634fd99 [file] [log] [blame]
Rolf Badorekef2bf512019-08-20 11:17:15 +03001/*
2 Copyright (c) 2018-2019 Nokia.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef SHAREDDATALAYER_SYSTEMLOGGER_HPP_
18#define SHAREDDATALAYER_SYSTEMLOGGER_HPP_
19
20#include <memory>
21#include <string>
22#include "private/logger.hpp"
23
24namespace shareddatalayer
25{
26 class SystemLogger: public Logger
27 {
28 public:
29 explicit SystemLogger(const std::string& prefix);
30
31 ~SystemLogger();
32
33 std::ostream& emerg() override;
34
35 std::ostream& alert() override;
36
37 std::ostream& crit() override;
38
39 std::ostream& error() override;
40
41 std::ostream& warning() override;
42
43 std::ostream& notice() override;
44
45 std::ostream& info() override;
46
47 std::ostream& debug() override;
48
49 private:
50 const std::string prefix;
51 std::unique_ptr<std::ostream> osEmerg;
52 std::unique_ptr<std::ostream> osAlert;
53 std::unique_ptr<std::ostream> osCrit;
54 std::unique_ptr<std::ostream> osError;
55 std::unique_ptr<std::ostream> osWarning;
56 std::unique_ptr<std::ostream> osNotice;
57 std::unique_ptr<std::ostream> osInfo;
58 std::unique_ptr<std::ostream> osDebug;
59 };
60}
61
62#endif