-
首页
-
C4D R23.110 C++ SDK
LoggerInterface Class Reference
系统
#include <logger.h>
Member Typedef Documentation
◆
LOGGERTYPEINITCALLBACK
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
Alloc()
Allocates a logger.
◆
AddLoggerType()
Adds a logger type to the logger.
-
参数
-
[in]
|
ta
|
Set the audience. The logger type will get the string if the target audience matches when
LoggerInterface::Write
被使用。
|
[in]
|
loggerTypeCls
|
Class
object of logger type ref (e.g. maxon::LoggerTypes::Application())
|
[in]
|
cb
|
Optional callback that is executed to initialize a logger type after added to the logger. E.g. the file logger needs to be initialized with a destination path.
|
◆
RemoveLoggerType()
Removes a logger type from a logger. Also succeeds if the logger type was not part of the logger.
◆
RemoveLoggerTypes()
Removes all logger types of the passed type.
-
参数
-
[in]
|
loggerTypeCls
|
All logger types with the passed class type will be removed.
|
◆
Write()
Sends a string to all added logger types.
-
参数
-
[in]
|
ta
|
All logger types which match the target audience will receive the string.
|
[in]
|
str
|
String
to print.
|
[in]
|
loc
|
Source location where the string was printed from.
|
[in]
|
level
|
Meta information for the current write operation.
|
◆
GetName()
Returns the name of the logger.
-
返回
-
The name.
◆
SetName()
Sets the name of the logger.
-
参数
-
◆
Enable()
Enable or disable the logger. If disabled, the logger still consumes strings but discards them.
-
参数
-
[in]
|
enable
|
True or false to enable or disable the logger.
|
◆
IsEnabled()
Returns if the logger is enabled.
-
返回
-
True or false.
◆
GetLoggerTypes()
Returns all logger types including their audience.
-
返回
-
An array of pairs with logger types and the audience.
◆
MAXON_OBSERVABLE_STATIC()
MAXON_OBSERVABLE_STATIC
|
(
|
void
|
,
|
|
|
ObservableLoggerNew
|
,
|
|
|
(const LoggerRef &logger)
|
,
|
|
|
ObservableCombinerRunAllComponent
|
|
|
)
|
|
|
Add observer to get notified once a new logger got added.
-
参数
-
[in]
|
logger
|
The new logger
|
◆
AddNewLogger()
Add a new logger to the system. Does the same as Loggers::Insert, but also triggers the observers
-
参数
-
[in]
|
module
|
The module which initiates the call. When the module is freed, the logger will be freed too.
|
-
返回
-
An array of pairs with logger types and the audience.
◆
DefaultLoggerTypeInit()
static
Result
<void> DefaultLoggerTypeInit
|
(
|
LoggerTypeRef &
|
|
)
|
|
|
static
private
|