This repository was archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogmsg.h
More file actions
76 lines (59 loc) · 1.58 KB
/
logmsg.h
File metadata and controls
76 lines (59 loc) · 1.58 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* @file usermsg.h
* @brief Declarations for UserMsg class
* @author
* @copyright Copyright 2014 piles contributors. All rights reserved.
* This file is released under the
* [MIT License](http://opensource.org/licenses/mit-license.html)
*/
#ifndef GUARD_LOGMSG_H_INCLUDE
#define GUARD_LOGMSG_H_INCLUDE
#include <usermsg/usermsg-config.h>
#include <usermsg/usermsgentry.h>
#include <QVector>
//! Log messages.
class USERMSG_EXPORT LogMsg {
public:
//! Show an error entry.
static inline void
err (
const QString & s_message) {
msg (UserMsgEntry::UTERROR, s_message);
}
//! Show a warning entry.
static inline void
war (
const QString & s_message) {
msg (UserMsgEntry::UTWARNING, s_message);
}
//! Show an informative entry.
static inline void
info (
const QString & s_message) {
msg (UserMsgEntry::UTINFO, s_message);
}
//! Show an error entry.
static inline void
dbgErr (
const QString & s_message) {
msg (UserMsgEntry::UTDBG_ERROR, s_message);
}
//! Show a warning entry.
static inline void
dbgWar (
const QString & s_message) {
msg (UserMsgEntry::UTDBG_ERROR, s_message);
}
//! Show an informative entry.
static inline void
dbgInfo (
const QString & s_message) {
msg (UserMsgEntry::UTDBG_INFO, s_message);
}
//! Show an entry.
static void
msg (
UserMsgEntry::Type ty,
const QString & s_message);
};
#endif // GUARD_LOGMSG_H_INCLUDE