Simple-Log  alpha-v0.7
EasyStart/main.cpp
1 // Copyright Dominic Koepke 2021 - 2021.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // https://www.boost.org/LICENSE_1_0.txt)
5 
6 /* With inclusion of this header, there will be automatically gCore, gConsoleSink and gLog constructed, which you might use.*/
8 
9 // just pull everything into the current namespace
10 using namespace sl::log::ready_to_go;
11 
12 int main()
13 {
14  // This line will be printed on the console with the severity "info".
15  gLog() << "Hello, World!";
16  // You may adjust the severity for the currently created Record like so.
17  gLog() << SetSev(SevLvl::debug) << "Mighty debug message";
18  // The severity manipulator doesn't has to appear at front. Place it anywhere in your Record construction chain.
19  gLog() << "Print my important hint!" << SetSev(SevLvl::hint);
20 }
21 
22 /*Core will make sure, that all pending Records will be processed before it gets destructed.*/
23 /*
24  * The above code may generate this output:
25 20:18:59.357 >>> info:: Hello, World!
26 20:18:59.357 >>> debug:: Mighty debug message
27 20:18:59.357 >>> hint:: Print my important hint!
28  *
29  * Keep in mind, you are completely free how you are going to format your message. This is just the default one.
30  */
Manipulates the channel of the current RecordBuilder object.
Definition: RecordBuilder.hpp:31
Definition: ReadyToGo.hpp:14
auto gLog
Definition: ReadyToGo.hpp:20