source: nscp/service/settings_logger_impl.hpp @ b3078b4

0.4.00.4.10.4.2
Last change on this file since b3078b4 was d5356c1, checked in by Michael Medin <michael@…>, 4 years ago

tried boost::asio in the NRPECLient and split settings to a new file (reduces build time)

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#pragma once
2
3#include "core_api.h"
4#include <settings/Settings.h>
5
6class settings_logger : public Settings::LoggerInterface {
7public:
8        //////////////////////////////////////////////////////////////////////////
9        /// Log an ERROR message.
10        ///
11        /// @param file the file where the event happened
12        /// @param line the line where the event happened
13        /// @param message the message to log
14        ///
15        /// @author mickem
16        void err(std::wstring file, int line, std::wstring message) {
17                NSAPIMessage(NSCAPI::error, file.c_str(), line, message.c_str());
18        }
19        //////////////////////////////////////////////////////////////////////////
20        /// Log an WARNING message.
21        ///
22        /// @param file the file where the event happened
23        /// @param line the line where the event happened
24        /// @param message the message to log
25        ///
26        /// @author mickem
27        void warn(std::wstring file, int line, std::wstring message) {
28                NSAPIMessage(NSCAPI::warning, file.c_str(), line, message.c_str());
29        }
30        //////////////////////////////////////////////////////////////////////////
31        /// Log an INFO message.
32        ///
33        /// @param file the file where the event happened
34        /// @param line the line where the event happened
35        /// @param message the message to log
36        ///
37        /// @author mickem
38        void info(std::wstring file, int line, std::wstring message) {
39                NSAPIMessage(NSCAPI::log, file.c_str(), line, message.c_str());
40        }
41        //////////////////////////////////////////////////////////////////////////
42        /// Log an DEBUG message.
43        ///
44        /// @param file the file where the event happened
45        /// @param line the line where the event happened
46        /// @param message the message to log
47        ///
48        /// @author mickem
49        void debug(std::wstring file, int line, std::wstring message) {
50                NSAPIMessage(NSCAPI::debug, file.c_str(), line, message.c_str());
51        }
52};
Note: See TracBrowser for help on using the repository browser.