Plasma Engine  2.0
Loading...
Searching...
No Matches
LogEntry.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/Logging/Log.h>
5#include <Foundation/Reflection/Reflection.h>
6#include <Foundation/Strings/String.h>
7
8PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plLogMsgType);
9
13struct PL_FOUNDATION_DLL plLogEntry
14{
15 plLogEntry();
17
18 plString m_sMsg;
19 plString m_sTag;
21 plUInt8 m_uiIndentation = 0;
22 double m_fSeconds = 0;
23};
24
25PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plLogEntry);
26
41class PL_FOUNDATION_DLL plLogEntryDelegate : public plLogInterface
42{
43public:
44 using Callback = plDelegate<void(plLogEntry&)>;
47 virtual void HandleLogMessage(const plLoggingEventData& le) override;
48
49private:
50 Callback m_Callback;
51};
A log interface implementation that converts a log event into a plLogEntry and calls a delegate with ...
Definition LogEntry.h:42
Base class for all logging classes.
Definition Log.h:77
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
A persistent log entry created from a plLoggingEventData. Allows for a log event to survive for longe...
Definition LogEntry.h:14
Describes the types of events that plLog sends.
Definition Log.h:25
Enum
Definition Log.h:29
@ All
Can be used to enable all log message types.
Definition Log.h:42
The data that is sent through plLogInterface.
Definition Log.h:50