Minor optimizations
- Stopped writing interpolated properties with invalid names
- Added global
LogExtensions_Interpolated.Enabled
setting
Added Properties
field to OperationContextValue.
Added escaping for interpolated property names.
Reduced memory traffic in log extensoins, added several optimizations.
Added interpolated string handlers.
WithMutatedPropertiesLog minor optimization
Speed up Info\Error\etc extensions by ~10-20 percent.
Added WithTransformation
extention.
Added net6.0
target.
Allow dot character in property names.
WithMinimumLevel can take minLevelProvider of type Func now.
ForContext now offers nice formatting for generic type names.
Filters by source contexts now use SourceContextWrapper
.
- Moderate performance improvements (up to 30% more single-threaded throughput);
- Outer WithProperty decorators are now able to overwrite properties defined by inner ones.
Bugfix in DeconstructionHelper: anonymous types may have a custom ToString() implementation.
Fixed #13.
The rules for deconstruction of the single argument are now as follows (in the order of priority):
- Always deconstruct IReadonlyDictionary<string, object>
- Do not deconstruct any other collections
- Do not deconstruct types with custom ToString() implementation
- Always deconstruct anonymous types
- Always deconstruct when message template has more than one property
- Do not deconstruct anything else
Implemented #10
Minor fix in detection of anonymous types.
Added WithErrorsTransformedToWarns
extension.
Fixed #11
Fixed issue with Guid?
properties logging.
- Source context filtering extensions now treat supplied context values as case-insensitive prefixes.
- Added
EnrichBySourceContext
extension.
- Added
WithMinimumLevelForSourceContext
extension. - Added a public constructor with properties dictionary to
LogEvent
.
Added WithEventsSelectedBySourceContext
and WithEventsDroppedBySourceContext
extensions.
LogEventExtensions
(WithObjectProperties
and WithParameters
) are public now.
Fixed lowerCamelCase WellKnownProperties
.
- Added log levels transformation extension:
log.WithLevelsTransformation(...)
-
Breaking change: source context is now hierarchical. Chained ForContext() calls are expected to accumulate a sequence of contexts instead of overriding current value.
-
Introduced well-known property names for source context (resulting from ForContext calls), operation context (new name for contextual prefixes) and trace context.
-
Introduced SourceContextValue and OperationContextValue classes as expected value types for properties mentioned above.
-
LogEvent: added WithMessageTemplate(), WithException() and other similar methods.
ILog extensions are now more forgiving to parameters count mismatch: provided params are now matched to names from template even when no exact match is found.
Added ILog.SelectEvents(Predicate<LogEvent>)
and ILog.DropEvents(Predicate<LogEvent>)
extension methods.
Added LogProvider: static shared configuration point for libraries.
ForContext extension no longer uses full type names by default.
Precise timestamps in log events.
Initial prerelease.