-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Logger
RocksDB supports a generalized message logging infrastructure. RocksDB caters to a variety of use cases -- from low power mobile systems to high end servers running distributed applications. The framework helps extent the message logging infrastructure as per the use case requirements. The mobile app might need a relatively simpler logging mechanism, compared to a server running mission critical application. It also provides a means to integrate RocksDB log messages with the embedded application logging infrastructure.
The Logger class provides the interface definition for logging messages from RocksDB.
The various implementations of Logger available are:
Implementation | Use |
---|---|
NullLogger | /dev/null equivalent for logger |
StderrLogger | Pipes the messages to std::err equivalent |
HdfsLogger | Logs messages to HDFS |
PosixLogger | Logs messages to POSIX file |
AutoRollLogger | Automatically rolls files as they reach a certain size. Typically used for servers |
EnvLogger | Log using an arbitrary Env |
WinLogger | Specialized logger for Windows OS |
Users are encouraged to write their own logging infrastructure as per the use case by extending any one of the existing logger implementations.
With the default logger, the log files can grow to very large. It makes it harder for users to budget the disk space for it, especially for databases that are relatively small. Auto roll logger can help cap the disk usage by information logs. An auto roll logger will be automatically created on top of the logger defined in Env, if a user sets options.max_log_file_size
, each file will be capped with that size, and combine the option with options.keep_log_file_num
will have the total size of info log files under control.
options.log_file_time_to_roll
can make log file rolling triggered by time.
Contents
- RocksDB Wiki
- Overview
- RocksDB FAQ
- Terminology
- Requirements
- Contributors' Guide
- Release Methodology
- RocksDB Users and Use Cases
- RocksDB Public Communication and Information Channels
-
Basic Operations
- Iterator
- Prefix seek
- SeekForPrev
- Tailing Iterator
- Compaction Filter
- Multi Column Family Iterator (Experimental)
- Read-Modify-Write (Merge) Operator
- Column Families
- Creating and Ingesting SST files
- Single Delete
- Low Priority Write
- Time to Live (TTL) Support
- Transactions
- Snapshot
- DeleteRange
- Atomic flush
- Read-only and Secondary instances
- Approximate Size
- User-defined Timestamp
- Wide Columns
- BlobDB
- Online Verification
- Options
- MemTable
- Journal
- Cache
- Write Buffer Manager
- Compaction
- SST File Formats
- IO
- Compression
- Full File Checksum and Checksum Handoff
- Background Error Handling
- Huge Page TLB Support
- Tiered Storage (Experimental)
- Logging and Monitoring
- Known Issues
- Troubleshooting Guide
- Tests
- Tools / Utilities
-
Implementation Details
- Delete Stale Files
- Partitioned Index/Filters
- WritePrepared-Transactions
- WriteUnprepared-Transactions
- How we keep track of live SST files
- How we index SST
- Merge Operator Implementation
- RocksDB Repairer
- Write Batch With Index
- Two Phase Commit
- Iterator's Implementation
- Simulation Cache
- [To Be Deprecated] Persistent Read Cache
- DeleteRange Implementation
- unordered_write
- Extending RocksDB
- RocksJava
- Lua
- Performance
- Projects Being Developed
- Misc