aboutsummaryrefslogtreecommitdiff
path: root/src/main/main.cpp
blob: 3b4b00bddecfc75ea22cc97515f689c295e6bc27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <string>
#include <iostream>
#include <boost/foreach.hpp>
#include <boost/log/trivial.hpp>

#if defined NDEBUG
    #define LOG_DEBUG(msg)
#else
    #define LOG_DEBUG(msg) BOOST_LOG_TRIVIAL(debug) << msg
#endif
#define LOG_INFO(msg) BOOST_LOG_TRIVIAL(info) << msg
#define LOG_WARNING(msg) BOOST_LOG_TRIVIAL(warning) << msg
#define LOG_ERROR(msg) BOOST_LOG_ERROR(error) << msg

int main()
{

    LOG_DEBUG("Log debug");
    LOG_INFO("Log info");
    LOG_WARNING("Log warning");

    std::string hello( "Hello, world!\n" );

    BOOST_FOREACH( char ch, hello )
    {
        std::cout << ch;
    }

    return 0;
}