Chromium Code Reviews| Index: talk/app/webrtc/objc/public/RTCFileLogger.h |
| diff --git a/talk/app/webrtc/objc/public/RTCFileLogger.h b/talk/app/webrtc/objc/public/RTCFileLogger.h |
| index 3900cb6fbeb5199913be877f246b3677ba1c6aae..95155f2def227bffc0e175184d8bd6b0de3b0557 100644 |
| --- a/talk/app/webrtc/objc/public/RTCFileLogger.h |
| +++ b/talk/app/webrtc/objc/public/RTCFileLogger.h |
| @@ -39,21 +39,38 @@ typedef NS_ENUM(NSUInteger, RTCFileLoggerSeverity) { |
| kRTCFileLoggerSeverityError |
| }; |
| +typedef NS_ENUM(NSUInteger, RTCFileLoggerRotationType) { |
| + kRTCFileLoggerRotationTypeMiddle, |
|
tkchin_webrtc
2015/11/16 21:37:25
suggest FileLoggerType
kRTCFileLoggerTypeCall
kRTC
Chuck
2015/12/04 22:42:57
Done.
|
| + kRTCFileLoggerRotationTypeOldest, |
| +}; |
| + |
| // This class intercepts WebRTC logs and saves them to a file. The file size |
| // will not exceed the given maximum bytesize. When the maximum bytesize is |
| -// reached logs from the beginning and the end are preserved while the middle |
| -// section is overwritten instead. |
| +// reached, logs are rotated according to the rotationType specified. |
| +// For kRTCFileLoggerRotationTypeMiddle, logs from the beginning and the end |
| +// are preserved while the middle section is overwritten instead. |
| +// For kRTCFileLoggerRotationTypeOldest, the oldest log is overwritten. |
| // This class is not threadsafe. |
| @interface RTCFileLogger : NSObject |
| // The severity level to capture. The default is kRTCFileLoggerSeverityInfo. |
| @property(nonatomic, assign) RTCFileLoggerSeverity severity; |
| -// Default constructor provides default settings for dir path and file size. |
| +// The rotation type for this file logger. The default is |
| +// kRTCFileLoggerRotationTypeMiddle. |
| +@property(nonatomic, readonly) RTCFileLoggerRotationType rotationType; |
| + |
| +// Default constructor provides default settings for dir path, file size and |
| +// rotation type. |
| - (instancetype)init; |
| +// Create file logger with default rotation type. |
| +- (instancetype)initWithDirPath:(NSString *)dirPath |
| + maxFileSize:(NSUInteger)maxFileSize; |
| + |
| - (instancetype)initWithDirPath:(NSString *)dirPath |
| maxFileSize:(NSUInteger)maxFileSize |
| + rotationType:(RTCFileLoggerRotationType)rotationType |
| NS_DESIGNATED_INITIALIZER; |
| // Starts writing WebRTC logs to disk if not already started. Overwrites any |