QLogger
Loading...
Searching...
No Matches
qlogger
log
logformatter.h
1
#ifndef QLOGGER_LOGFORMATTER_H
2
#define QLOGGER_LOGFORMATTER_H
3
4
#include "logentry.h"
5
#include "logbinary.h"
6
7
namespace
QLogger
8
{
9
10
class
QLOGGER_EXPORT
LogFormatter
11
{
12
13
public
:
14
using
CbFormatter
= std::function<QString(
const
LogEntry
&log)>;
15
16
public
:
17
static
LogBinary format(
const
LogEntry
&log);
18
static
void
setCustomFormat(
CbFormatter
formatter);
19
20
private
:
21
static
QString defaultFormatter(
const
LogEntry
&log);
22
23
private
:
24
static
CbFormatter
m_formatter;
25
};
26
27
}
// Namespace QLogger
28
29
#endif
// QLOGGER_LOGFORMATTER_H
QLogger::LogEntry
Used to store all log entry informations.
Definition
logentry.h:13
QLogger::LogFormatter
Use to format log.
Definition
logformatter.h:11
QLogger::LogFormatter::CbFormatter
std::function< QString(const LogEntry &log)> CbFormatter
Callback used when formatting log message.
Definition
logformatter.h:14
Generated on Fri Dec 6 2024 10:00:08 for QLogger by
1.12.0