ios-hooks/AppRunMan/XSLog.h
2025-11-13 17:40:14 +08:00

23 lines
753 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// @param logFileName 日志文件名
/// @param maxFileSize 日志文件最大大小(字节),超过此大小将创建新文件
void XSLogSetupLogWithFileName(NSString *logFileName, unsigned long long maxFileSize);
/// @param logFilePath 日志文件路径
/// @param maxFileSize 日志文件最大大小(字节),超过此大小将创建新文件
void XSLogSetupLogWithFilePath(NSString *logFilePath, unsigned long long maxFileSize);
void XSLogMessage(NSString *format, ...) __attribute__((format(NSString, 1, 2)));
void XSLogRedirectNSLog(void);
// 定义一个宏方便替换NSLog
#define XSLog(format, ...) XSLogMessage((format), ##__VA_ARGS__)
NS_ASSUME_NONNULL_END