Class RocksDbLoggingExtensions
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Attaches RocksDb's info log to Microsoft.Extensions.Logging.
public static class RocksDbLoggingExtensions
- Inheritance
-
RocksDbLoggingExtensions
- Inherited Members
Methods
UseLogging(DbOptions, ILoggerFactory, string)
Sends the info log of a database opened with these options to a logger
from loggerFactory.
public static DbOptions UseLogging(this DbOptions options, ILoggerFactory loggerFactory, string categoryName = "RocksDb")
Parameters
optionsDbOptionsThe options to attach the logger to.
loggerFactoryILoggerFactoryThe factory to create the logger from.
categoryNamestringThe logger's category.
Returns
- DbOptions
options, for chaining.
Remarks
The options take the logger over and release it after the last database opened with them closes. See MicrosoftExtensionsLogger for how levels map and when the level is decided.