CBLFileLogSink

@interface CBLFileLogSink : NSObject

A log sink that writes log messages to files.

  • The minimum log level for log messages. Default is kCBLLogLevelNone, meaning no logging.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int level;
  • The directory where log files will be stored.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull directory;
  • To use plain text file format instead of the default binary format.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL usePlaintext;
  • The maximum number of log files to keep. Default is kCBLDefaultMaxKeptFiles.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger maxKeptFiles;
  • The maximum size of a log file before rotation. Default is kCBLDefaultMaxFileSize.

    Declaration

    Objective-C

    @property (nonatomic, readonly) long long maxFileSize;
  • Initializes with log level and directory.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLevel:(id)level
                                directory:(nonnull NSString *)directory;

    Parameters

    level

    The minimum log level.

    directory

    The log file directory.

  • Initializes with full configuration options.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLevel:(id)level
                                directory:(nonnull NSString *)directory
                             usePlaintext:(BOOL)usePlainText
                             maxKeptFiles:(NSInteger)maxKeptFiles
                              maxFileSize:(long long)maxFileSize;

    Parameters

    level

    The minimum log level.

    directory

    The log file directory.

    usePlainText

    Whether to use plain text format.

    maxKeptFiles

    The maximum number of log files.

    maxFileSize

    The maximum size of a log file.

  • Unavailable

    Not available

    Declaration

    Objective-C

    - (nonnull instancetype)init;