summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/lib/common/XLog.h
diff options
context:
space:
mode:
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/lib/common/XLog.h')
-rwxr-xr-xveslibrary/ves_cpplibrary/src/lib/common/XLog.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/veslibrary/ves_cpplibrary/src/lib/common/XLog.h b/veslibrary/ves_cpplibrary/src/lib/common/XLog.h
new file mode 100755
index 0000000..aae8c31
--- /dev/null
+++ b/veslibrary/ves_cpplibrary/src/lib/common/XLog.h
@@ -0,0 +1,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);
+ }
+}