diff options
author | vnugent <public@vaughnnugent.com> | 2023-01-27 21:13:05 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-01-27 21:13:05 -0500 |
commit | a5d88f2cf08ea3aad2c8802bdc416e7b40c0f204 (patch) | |
tree | e7b9347717c096ef0ea517769b5136ef8abf9571 /lib/Plugins.PluginBase | |
parent | 185afcee727027c60257ddda4da974dccb808e5a (diff) |
Object cache overhaul and logger updates
Diffstat (limited to 'lib/Plugins.PluginBase')
-rw-r--r-- | lib/Plugins.PluginBase/src/VLogProvider.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Plugins.PluginBase/src/VLogProvider.cs b/lib/Plugins.PluginBase/src/VLogProvider.cs index d95725f..4ec05c2 100644 --- a/lib/Plugins.PluginBase/src/VLogProvider.cs +++ b/lib/Plugins.PluginBase/src/VLogProvider.cs @@ -24,6 +24,7 @@ using System; using System.Linq; +using System.Runtime.CompilerServices; using Serilog; using Serilog.Core; @@ -46,21 +47,31 @@ namespace VNLib.Plugins /// </summary> /// <param name="config">Configuration to generate the logger from</param> public VLogProvider(LoggerConfiguration config) => LogCore = config.CreateLogger(); + ///<inheritdoc/> - public void Flush() { } + public void Flush() {} + ///<inheritdoc/> public object GetLogProvider() => LogCore; + + ///<inheritdoc/> + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool IsEnabled(LogLevel level) => LogCore.IsEnabled((LogEventLevel)level); + ///<inheritdoc/> + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Write(LogLevel level, string value) { LogCore.Write((LogEventLevel)level, value); } ///<inheritdoc/> + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Write(LogLevel level, Exception exception, string value = "") { LogCore.Write((LogEventLevel)level, exception, value); } ///<inheritdoc/> + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Write(LogLevel level, string value, params object[] args) { LogCore.Write((LogEventLevel)level, value, args); |