Log Class¶
Description¶
日志类。
用于设置自定义日志输出函数。
setLogFunc¶
设置自定义日志输出函数。此日志输出函数应保证线程安全。
- C
void easyar_Log_setLogFunc(easyar_FunctorOfVoidFromLogLevelAndString func)
- C++17
static void setLogFunc(std::function<void(LogLevel, std::string)> func)
- C++03(Deprecated)
static void setLogFunc(FunctorOfVoidFromLogLevelAndString func)
- Java
public static void setLogFunc(@Nonnull FunctorOfVoidFromLogLevelAndString func)
- Kotlin
companion object fun setLogFunc(func: FunctorOfVoidFromLogLevelAndString): Unit
- Objective-C
+ (void)setLogFunc:(void (^)(easyar_LogLevel level, NSString * message))func
- Swift
public static func setLogFunc(_ `func`: @escaping (LogLevel, String) -> Void) -> Void
- C#
public static void setLogFunc(Action<LogLevel, string> func)
setLogFuncWithScheduler¶
设置自定义日志输出函数,并通过scheduler来指定运行时机。
- C
void easyar_Log_setLogFuncWithScheduler(easyar_CallbackScheduler * scheduler, easyar_FunctorOfVoidFromLogLevelAndString func)
- C++17
static void setLogFuncWithScheduler(std::shared_ptr<CallbackScheduler> scheduler, std::function<void(LogLevel, std::string)> func)
- C++03(Deprecated)
static void setLogFuncWithScheduler(CallbackScheduler * scheduler, FunctorOfVoidFromLogLevelAndString func)
- Java
public static void setLogFuncWithScheduler(@Nonnull CallbackScheduler scheduler, @Nonnull FunctorOfVoidFromLogLevelAndString func)
- Kotlin
companion object fun setLogFuncWithScheduler(scheduler: CallbackScheduler, func: FunctorOfVoidFromLogLevelAndString): Unit
- Objective-C
+ (void)setLogFuncWithScheduler:(easyar_CallbackScheduler *)scheduler func:(void (^)(easyar_LogLevel level, NSString * message))func
- Swift
public static func setLogFuncWithScheduler(_ scheduler: CallbackScheduler, _ `func`: @escaping (LogLevel, String) -> Void) -> Void
- C#
public static void setLogFuncWithScheduler(CallbackScheduler scheduler, Action<LogLevel, string> func)
resetLogFunc¶
清除自定义日志输出函数,还原成默认的日志输出函数。
- C
void easyar_Log_resetLogFunc(void)
- C++17
static void resetLogFunc()
- C++03(Deprecated)
static void resetLogFunc()
- Java
public static void resetLogFunc()
- Kotlin
companion object fun resetLogFunc(): Unit
- Objective-C
+ (void)resetLogFunc
- Swift
public static func resetLogFunc() -> Void
- C#
public static void resetLogFunc()