summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/lib/common/XLog.h
blob: aae8c311362cb5cdc3cd6502aebeb6305a02a140 (plain)
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
31
32
33
34
35
#pragma once

#include <string>

namespace vagt
{
    namespace log
    {
        /*************************************************************************************************//**
        * @brief Log level 
        *****************************************************************************************************/
        enum XLogLevel
        {
            XLogTrace,
            XLogDebug,
            XLogInfo,
            XLogWarn,
            XLogErr,
            XLogCritical,
            XLogOff,
        };

        /*************************************************************************************************//**
        *    Initialize the file logging. 
        *
        *    @note           To disable logging, set the path to "/dev/null" .
        *****************************************************************************************************/
        void init(const std::string& path, int logFileSize = 1048576 * 5, int logFileNum = 10);

        /*************************************************************************************************//**
        *    Set log level.
        *****************************************************************************************************/
        void setLevel(XLogLevel level);
    }
}