diff --git a/Common.Actor.sln b/Common.Actor.sln index dfa7eee..ab548e6 100644 --- a/Common.Actor.sln +++ b/Common.Actor.sln @@ -23,10 +23,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets license.txt = license.txt - netcoreTemplate.sln.DotSettings.user = netcoreTemplate.sln.DotSettings.user readme.md = readme.md release.chklist = release.chklist - template.json.bak = template.json.bak Version.props = Version.props EndProjectSection EndProject diff --git a/Directory.Build.targets b/Directory.Build.targets index b9a60a3..6560fa3 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -2,7 +2,7 @@ diff --git a/Version.props b/Version.props index a8c2e1f..07d8db6 100644 --- a/Version.props +++ b/Version.props @@ -9,11 +9,11 @@ 1 0 - 0 - 23 - 1.0.0 - 1.0.0+23.181230112254.master.22cccb7 - 22cccb7 + 1 + 28 + 1.0.1 + 1.0.1+28.190122143650.master.f8d71bf + f8d71bf master \ No newline at end of file diff --git a/build.tasks/GenerateNuSpecFileTask.cs b/build.tasks/GenerateNuSpecFileTask.cs index 8fe80fc..928f53c 100644 --- a/build.tasks/GenerateNuSpecFileTask.cs +++ b/build.tasks/GenerateNuSpecFileTask.cs @@ -84,12 +84,12 @@ public class GenerateNuSpecFileTask : Task /// URL to package license /// public string PackageLicenseUrl { get; set; } - + /// /// Package license type /// public string PackageLicense { get; set; } - + /// /// URL to package project /// @@ -227,10 +227,14 @@ public override bool Execute() { foreach (var r in PackageReferences) { - var item = r.ItemSpec; - if (item != "NETStandard.Library") + var isImplicit = r.GetMetadata("IsImplicitlyDefined") == "true"; + var privateAssets = r.GetMetadata("PrivateAssets"); + if (string.IsNullOrWhiteSpace(privateAssets)) privateAssets = "build,analyzers"; + var isAllPrivate = privateAssets.ToLower() == "all"; + + if (!isImplicit && !isAllPrivate) sb.AppendLine( - $" "); + $" "); } } diff --git a/build/custom/Build.props.debug b/build/custom/Build.props.debug index 55c33f0..4ce35bd 100644 --- a/build/custom/Build.props.debug +++ b/build/custom/Build.props.debug @@ -7,7 +7,7 @@ ======================================================================================= --> - true + false diff --git a/changelog.md b/changelog.md index e714d2a..e5ed104 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [1.0.1] - 2019-01-22 ## +### Changed ### +- Updated Commons to latest version + +### Fixed ### +- Updated build template - source code packages are not dependency of standard nuget package anymore + + ## [1.0.0] - 2018-12-30 ## ### Changed ### - Updated Commons to latest version @@ -15,5 +24,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added ### - Initial release +[1.0.1]: https://github.com/adamecr/Common.Actor/compare/v1.0.0...v1.0.1 [1.0.0]: https://github.com/adamecr/Common.Actor/compare/v0.1.0...v1.0.0 [0.1.0]: https://github.com/adamecr/Common.Actor/releases/tag/v0.1.0 \ No newline at end of file diff --git a/doc/net.adamec.lib.common.actor.html b/doc/net.adamec.lib.common.actor.html index a534b0e..cc17641 100644 --- a/doc/net.adamec.lib.common.actor.html +++ b/doc/net.adamec.lib.common.actor.html @@ -65,7 +65,7 @@

Types

ErrorMessagepublicClassSpecialized Envelope for messages in ErrorMessageQueue ExchangeActor<TSubscription,TSubscriptionMessage,TUnSubscriptionMessage>public abstractClassExchange actor base class providing the common logic for implementation of exchanges - the actors routing the messages to another actors based on subscriptions. InternalQueueinternalClassAn unbounded mailbox managed message queue used by ManagedMessageQueue as the main message queue Allows access to stored messages for monitoring using Copy() . Note: the messages in the array must not be modified!!! -LoggerExtinternalClassILogger extensions +LoggerExtinternalClassExtended logger implementing ILogger ManagedMessageQueuepublicClassMessage queue for net.adamec.home.control.common.actor.manager.mailbox.ManagedUnboundedDequeBasedMailbox allowing the monitoring (access to) messages stores in the queue The main queue is implemented using net.adamec.home.control.common.actor.manager.mailbox.ManagedMessageQueue and also uses a System.Collections.Generic.Stack`1 internally to store each individual net.adamec.home.control.common.actor.manager.mailbox.ManagedMessageQueue.EnqueueFirst(Akka.Actor.Envelope) messages - supports stashing RoutingKeyExchangeActorpublicClassExchange Actor with zero or more actors per message type with routing based also on routing key Subscriptions are per actor, type and routing key. Subscription filter gets the all subscriptions where message is instance of filter type or its children and the routing keys match RoutingKeySubscriptionpublicClassSubscription for exchanges that routes the messages based on their type and routing key diff --git a/doc/net.adamec.lib.common.actor.md b/doc/net.adamec.lib.common.actor.md index 1b6c136..1e197d2 100644 --- a/doc/net.adamec.lib.common.actor.md +++ b/doc/net.adamec.lib.common.actor.md @@ -33,7 +33,7 @@ | [ErrorMessage](net.adamec.lib.common.actor.message__m00bpk.md#t-net.adamec.lib.common.actor.message.errormessage__1gj1wb) | public | Class | Specialized [Envelope](net.adamec.lib.common.actor.message__m00bpk.md#t-net.adamec.lib.common.actor.message.envelope__5oxc3s) for messages in [ErrorMessageQueue](net.adamec.lib.common.actor.actorsystem__1ihx1md.md#p-net.adamec.lib.common.actor.actorsystem.iactorsystem.errormessagequeue__v9i6fy) | | [ExchangeActor<TSubscription,TSubscriptionMessage,TUnSubscriptionMessage>](net.adamec.lib.common.actor.actor.exchanges.@base__1g84l6h.md#t-net.adamec.lib.common.actor.actor.exchanges.base.exchangeactor-3__1p1cfiq) | public abstract | Class | Exchange actor base class providing the common logic for implementation of exchanges - the actors routing the messages to another actors based on subscriptions. | | [InternalQueue](net.adamec.lib.common.actor.queue__1lh8qrc.md#t-net.adamec.lib.common.actor.queue.internalqueue__49i5r8) | internal | Class | An unbounded mailbox managed message queue used by [ManagedMessageQueue](net.adamec.lib.common.actor.queue__1lh8qrc.md#t-net.adamec.lib.common.actor.queue.managedmessagequeue__1xckl09) as the main message queue Allows access to stored messages for monitoring using [Copy()](net.adamec.lib.common.actor.queue__1lh8qrc.md#m-net.adamec.lib.common.actor.queue.internalqueue.copy__1co1b8y) . Note: the messages in the array must not be modified!!! | - | [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) | internal | Class | [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) extensions | + | [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) | internal | Class | Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) | | [ManagedMessageQueue](net.adamec.lib.common.actor.queue__1lh8qrc.md#t-net.adamec.lib.common.actor.queue.managedmessagequeue__1xckl09) | public | Class | Message queue for net.adamec.home.control.common.actor.manager.mailbox.ManagedUnboundedDequeBasedMailbox allowing the monitoring (access to) messages stores in the queue The main queue is implemented using net.adamec.home.control.common.actor.manager.mailbox.ManagedMessageQueue and also uses a System.Collections.Generic.Stack`1 internally to store each individual net.adamec.home.control.common.actor.manager.mailbox.ManagedMessageQueue.EnqueueFirst(Akka.Actor.Envelope) messages - supports stashing | | [RoutingKeyExchangeActor](net.adamec.lib.common.actor.actor.exchanges.typed__1mtmrao.md#t-net.adamec.lib.common.actor.actor.exchanges.typed.routingkeyexchangeactor__1inw5x7) | public | Class | Exchange Actor with zero or more actors per message type with routing based also on routing key Subscriptions are per actor, type and routing key. Subscription filter gets the all subscriptions where message is instance of filter type or its children and the routing keys match | | [RoutingKeySubscription](net.adamec.lib.common.actor.actor.exchanges.typed__1mtmrao.md#t-net.adamec.lib.common.actor.actor.exchanges.typed.routingkeysubscription__1t32gw0) | public | Class | Subscription for exchanges that routes the messages based on their type and routing key | diff --git a/doc/net.adamec.lib.common.logging__1g9pm29.html b/doc/net.adamec.lib.common.logging__1g9pm29.html index 66db5b7..416859d 100644 --- a/doc/net.adamec.lib.common.logging__1g9pm29.html +++ b/doc/net.adamec.lib.common.logging__1g9pm29.html @@ -39,7 +39,7 @@

net.adamec.lib.com

Classes

- +
NameModifierSummary
CommonLogginginternal staticILogger factory
LoggerExtinternalILogger extensions
LoggerExtinternalExtended logger implementing ILogger

Interfaces

@@ -106,15 +106,15 @@

LoggerExt Class

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
-Source-only packages: RadCommons.logging.CommonLogging

-

ILogger extensions

+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Source-only packages: RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging

+

Extended logger implementing ILogger

internal class LoggerExt : Logger, ILogger

Inheritance: object -> NLog.Logger
Implements: net.adamec.lib.common.logging.ILogger, NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress

Methods

- + @@ -139,9 +139,9 @@

Methods

- - - + + + @@ -152,16 +152,16 @@

Methods

Go to namespaces or types or source-only packages

-

LoggerExt.CreateException<TException>(string, Exception) Method

+

LoggerExt.CreateException<TException>(string, string, Exception) Method

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type

-
private static LoggerExt.TException CreateException<TException>(string message, Exception innerException = null) where TException: Exception
+
private static LoggerExt.TException CreateException<TException>(string message, out string stackTrace, Exception innerException = null) where TException: Exception
Type parameters
TException
-Method parameters
string message
Log message.
System.Exception innerException
Exception to be logged
+Method parameters
string message
Log message.
string stackTrace
Stack trace to be logged in StackTrace event property
System.Exception innerException
Exception to be logged

Return value

net.adamec.lib.common.logging.LoggerExt.TException
Created exception

Go to namespaces or types or source-only packages

@@ -169,7 +169,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Debug level.

public void Debug(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -181,7 +181,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Debug level with correlation ID.

public void DebugCorr(string correlationId, [Localizable(false)] string message)
@@ -193,7 +193,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level.

public void Error(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -205,7 +205,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level.

public void Error(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -217,7 +217,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level. Creates and returns the exception of given type

public LoggerExt.TException Error<TException>(string message, Exception innerException = null) where TException: Exception
@@ -230,7 +230,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID.

public void ErrorCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -242,7 +242,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID.

public void ErrorCorr(string correlationId, [Localizable(false)] string message)
@@ -254,7 +254,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public LoggerExt.TException ErrorCorr<TException>(string correlationId, LoggerExt.TException exception, string message = null) where TException: Exception
@@ -267,7 +267,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type

public LoggerExt.TException ErrorCorr<TException>(string correlationId, string message, Exception innerException = null) where TException: Exception
@@ -280,7 +280,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public bool ErrorFltr<TException>(LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -306,7 +306,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public bool ErrorFltrCorr<TException>(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -323,7 +323,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns given exception

public Exception ErrorPassThrough(Exception exception, string message = null)
@@ -335,7 +335,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level.

public void Fatal(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -347,7 +347,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level.

public void Fatal(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -359,7 +359,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type

public LoggerExt.TException Fatal<TException>(string message, Exception innerException = null) where TException: Exception
@@ -372,7 +372,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID.

public void FatalCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -384,7 +384,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID.

public void FatalCorr(string correlationId, [Localizable(false)] string message)
@@ -396,7 +396,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns the exception of given type

public LoggerExt.TException FatalCorr<TException>(string correlationId, LoggerExt.TException exception, string message = null) where TException: Exception
@@ -409,7 +409,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type

public LoggerExt.TException FatalCorr<TException>(string correlationId, string message, Exception innerException = null) where TException: Exception
@@ -422,7 +422,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns catchIt value.

public bool FatalFltr<TException>(LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -439,7 +439,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns catchIt value.

public bool FatalFltrCorr<TException>(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -456,7 +456,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns given exception >

public Exception FatalPassThrough(Exception exception, string message = null)
@@ -468,7 +468,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Info level.

public void Info(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -480,7 +480,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Info level with correlation ID.

public void InfoCorr(string correlationId, [Localizable(false)] string message)
@@ -488,39 +488,39 @@

void
Implements: ILogger.InfoCorr(string, string)

Go to namespaces or types or source-only packages

-

LoggerExt.LogIt(LogLevel, Dictionary<string,object>, string, Exception) Method

+

LoggerExt.LogIt(LogLevel, Dictionary<string,object>, string, Exception, string) Method

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the item (message with optional event properties and exception) into the log

-
private void LogIt(LogLevel level, Dictionary<string,object> eventProperties, [Localizable(false)] string message, Exception exception = null)
-Method parameters
NLog.LogLevel level
Dictionary<string,object> eventProperties
Event properties (null when no properties are provided)
string message
Log message
System.Exception exception
Optional exception to be logged
+
private void LogIt(LogLevel level, Dictionary<string,object> eventProperties, [Localizable(false)] string message, Exception exception = null, string stackTrace = null)
+Method parameters
NLog.LogLevel level
Dictionary<string,object> eventProperties
Event properties (null when no properties are provided)
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in StackTrace event property when the System.Exception.StackTrace of exception is empty

Return value

void

Go to namespaces or types or source-only packages

-

LoggerExt.LogIt(LogLevel, string, Exception) Method

+

LoggerExt.LogIt(LogLevel, string, Exception, string) Method

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the item (message with optional exception) into the log

-
private void LogIt(LogLevel level, [Localizable(false)] string message, Exception exception = null)
-Method parameters
NLog.LogLevel level
string message
Log message
System.Exception exception
Optional exception to be logged
+
private void LogIt(LogLevel level, [Localizable(false)] string message, Exception exception = null, string stackTrace = null)
+Method parameters
NLog.LogLevel level
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in StackTrace event property when the System.Exception.StackTrace of exception is empty

Return value

void

Go to namespaces or types or source-only packages

-

LoggerExt.LogIt(LogLevel, string, string, Exception) Method

+

LoggerExt.LogIt(LogLevel, string, string, Exception, string) Method

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the item (message with optional exception) with correlation Id into the log

-
private void LogIt(LogLevel level, string correlationId, [Localizable(false)] string message, Exception exception = null)
-Method parameters
NLog.LogLevel level
string correlationId
Correlation ID
string message
Log message
System.Exception exception
Optional exception to be logged
+
private void LogIt(LogLevel level, string correlationId, [Localizable(false)] string message, Exception exception = null, string stackTrace = null)
+Method parameters
NLog.LogLevel level
string correlationId
Correlation ID
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in StackTrace event property when the System.Exception.StackTrace of exception is empty

Return value

void

Go to namespaces or types or source-only packages

@@ -528,7 +528,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Trace level.

public void Trace(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -540,7 +540,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Trace level with correlation ID

public void TraceCorr(string correlationId, [Localizable(false)] string message)
@@ -552,7 +552,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level.

public void Warn(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -564,7 +564,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level.

public void Warn(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -576,7 +576,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level with correlation ID.

public void WarnCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -588,7 +588,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: LoggerExt
-Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level with correlation ID.

public void WarnCorr(string correlationId, [Localizable(false)] string message)
@@ -599,12 +599,39 @@

ILogger Interface

Namespace: net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
-Source-only packages: RadCommons.logging.CommonLogging

+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Source-only packages: RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging, RadCommons.logging.CommonLogging

Logger interface - wrapper around the NLog.ILogger with some additional methods

internal interface ILogger : ILogger

Implemented by: net.adamec.lib.common.logging.LoggerExt
Implements: NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress

+

Remarks

+

The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property.

Extended logger provides following methods to log with given set of the properties.

+ + + +

Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The ErrorPassThrough(Exception, string) and FatalPassThrough(Exception, string) methods will log given exception and return it for further processing.

    try
+    {
+      ...
+    }
+    catch (Exception ex){
+       if(logger.ErrorPassThrough(ex) is MyException){
+         return null;
+       }else{
+         throw;
+       } 
+    }
In the example above, the exception is always logged and then the decision/action is taken.

C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns false ). Extended logger provides functions ErrorFltr<TException>(ILogger.TException, string, bool) and FatalFltr<TException>(ILogger.TException, string, bool) for this purpose.

    try
+    {
+      ...
+    }
+    catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
+      //newer called as the default return value of ErrorFltr is false     
+    }
The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
    try
+    {
+      ...
+    }
+    catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... }
+    catch (Exception e) when (Logger.FatalFltr(e)) {}

Logger can also create and exception, log it and return using functions Error<TException>(string, Exception) and Fatal<TException>(string, Exception)

    if(value is null) throw logger.Fatal<ArgumentNullException>("Value is null");

When logging an exception using the LoggerExt methods, the event property StackTrace is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using new StackTrace(2, true).ToString() . In other cases when the System.Exception.StackTrace is null or empty, new StackTrace(true).ToString() is used.

LoggerExt also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property CorrelationId . Such methods have the name ending with Corr suffix.

Methods

NameModifierSummary
CreateException<TException>(string, Exception)private staticWrites the diagnostic message at the Fatal level. Creates and returns the exception of given type
CreateException<TException>(string, string, Exception)private staticWrites the diagnostic message at the Fatal level. Creates and returns the exception of given type
Debug(Dictionary<string,object>, string)publicWrites the diagnostic message at the Debug level.
DebugCorr(string, string)publicWrites the diagnostic message at the Debug level with correlation ID.
Error(Dictionary<string,object>, Exception, string)publicWrites the diagnostic message at the Error level.
FatalPassThrough(Exception, string)publicWrites the diagnostic message at the Fatal level and returns given exception >
Info(Dictionary<string,object>, string)publicWrites the diagnostic message at the Info level.
InfoCorr(string, string)publicWrites the diagnostic message at the Info level with correlation ID.
LogIt(LogLevel, Dictionary<string,object>, string, Exception)privateWrites the item (message with optional event properties and exception) into the log
LogIt(LogLevel, string, Exception)privateWrites the item (message with optional exception) into the log
LogIt(LogLevel, string, string, Exception)privateWrites the item (message with optional exception) with correlation Id into the log
LogIt(LogLevel, Dictionary<string,object>, string, Exception, string)privateWrites the item (message with optional event properties and exception) into the log
LogIt(LogLevel, string, Exception, string)privateWrites the item (message with optional exception) into the log
LogIt(LogLevel, string, string, Exception, string)privateWrites the item (message with optional exception) with correlation Id into the log
Trace(Dictionary<string,object>, string)publicWrites the diagnostic message at the Trace level.
TraceCorr(string, string)publicWrites the diagnostic message at the Trace level with correlation ID
Warn(Dictionary<string,object>, Exception, string)publicWrites the diagnostic message at the Warn level.
@@ -645,7 +672,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Debug level.

public abstract void Debug(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -657,7 +684,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Debug level with correlation ID.

public abstract void DebugCorr(string correlationId, [Localizable(false)] string message)
@@ -669,7 +696,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level.

public abstract void Error(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -681,7 +708,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level.

public abstract void Error(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -693,7 +720,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level. Creates and returns the exception of given type

public abstract ILogger.TException Error<TException>(string message, Exception innerException = null) where TException: Exception
@@ -706,7 +733,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID.

public abstract void ErrorCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -718,7 +745,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID.

public abstract void ErrorCorr(string correlationId, [Localizable(false)] string message)
@@ -730,7 +757,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public abstract ILogger.TException ErrorCorr<TException>(string correlationId, ILogger.TException exception, string message = null) where TException: Exception
@@ -743,7 +770,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type

public abstract ILogger.TException ErrorCorr<TException>(string correlationId, string message, Exception innerException = null) where TException: Exception
@@ -756,7 +783,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public abstract bool ErrorFltr<TException>(ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -782,7 +809,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns the exception of given type

public abstract bool ErrorFltrCorr<TException>(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -799,7 +826,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Error level and returns given exception

public abstract Exception ErrorPassThrough(Exception exception, string message = null)
@@ -811,7 +838,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level.

public abstract void Fatal(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -823,7 +850,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level.

public abstract void Fatal(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -835,7 +862,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type

public abstract ILogger.TException Fatal<TException>(string message, Exception innerException = null) where TException: Exception
@@ -848,7 +875,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID.

public abstract void FatalCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -860,7 +887,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID.

public abstract void FatalCorr(string correlationId, [Localizable(false)] string message)
@@ -872,7 +899,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns the exception of given type

public abstract ILogger.TException FatalCorr<TException>(string correlationId, ILogger.TException exception, string message = null) where TException: Exception
@@ -885,7 +912,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type

public abstract ILogger.TException FatalCorr<TException>(string correlationId, string message, Exception innerException = null) where TException: Exception
@@ -898,7 +925,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns catchIt value.

public abstract bool FatalFltr<TException>(ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -915,7 +942,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns catchIt value.

public abstract bool FatalFltrCorr<TException>(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
@@ -932,7 +959,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Fatal level and returns given exception

public abstract Exception FatalPassThrough(Exception exception, string message = null)
@@ -944,7 +971,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Info level.

public abstract void Info(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -956,7 +983,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Info level with correlation ID.

public abstract void InfoCorr(string correlationId, [Localizable(false)] string message)
@@ -968,7 +995,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Trace level.

public abstract void Trace(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -980,7 +1007,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Trace level with correlation ID.

public abstract void TraceCorr(string correlationId, [Localizable(false)] string message)
@@ -992,7 +1019,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level.

public abstract void Warn(Dictionary<string,object> eventProperties, Exception exception, [Localizable(false)] string message)
@@ -1004,7 +1031,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level.

public abstract void Warn(Dictionary<string,object> eventProperties, [Localizable(false)] string message)
@@ -1016,7 +1043,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level with correlation ID.

public abstract void WarnCorr(string correlationId, Exception exception, [Localizable(false)] string message)
@@ -1028,7 +1055,7 @@

net.adamec.lib.common.logging
Assembly: net.adamec.lib.common.actor
Type: ILogger
-Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
+Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
Source-only packages: RadCommons.logging.CommonLogging

Writes the diagnostic message at the Warn level with correlation ID.

public abstract void WarnCorr(string correlationId, [Localizable(false)] string message)
diff --git a/doc/net.adamec.lib.common.logging__1g9pm29.md b/doc/net.adamec.lib.common.logging__1g9pm29.md index 1429b55..b8ccdc7 100644 --- a/doc/net.adamec.lib.common.logging__1g9pm29.md +++ b/doc/net.adamec.lib.common.logging__1g9pm29.md @@ -5,7 +5,7 @@ | Name | Modifier | Summary | | ------ | ---------- | --------- | | [CommonLogging](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.commonlogging__1dar5wb) | internal static | [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) factory | - | [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) | internal | [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) extensions | + | [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) | internal | Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) | @@ -142,11 +142,11 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net ## LoggerExt Class ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs -Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs, App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) -[ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) extensions +Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) @@ -162,7 +162,7 @@ Implements: [net.adamec.lib.common.logging.ILogger](net.adamec.lib.common.loggin | Name | Modifier | Summary | | ------ | ---------- | --------- | - | [CreateException<TException>(string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.createexception--1_system.string-system.exception___1wtd924) | private static | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type | + | [CreateException<TException>(string, string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.createexception--1_system.string-system.string--system.exception___1kt7m7i) | private static | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type | | [Debug(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___by66ma) | public | Writes the diagnostic message at the `Debug` level. | | [DebugCorr(string, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debugcorr_system.string-system.string___i119af) | public | Writes the diagnostic message at the `Debug` level with correlation ID. | | [Error(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___7fy00h) | public | Writes the diagnostic message at the `Error` level. | @@ -187,9 +187,9 @@ Implements: [net.adamec.lib.common.logging.ILogger](net.adamec.lib.common.loggin | [FatalPassThrough(Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalpassthrough_system.exception-system.string___10psm2o) | public | Writes the diagnostic message at the `Fatal` level and returns given exception > | | [Info(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1qxds6b) | public | Writes the diagnostic message at the `Info` level. | | [InfoCorr(string, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.infocorr_system.string-system.string___3vobha) | public | Writes the diagnostic message at the `Info` level with correlation ID. | - | [LogIt(LogLevel, Dictionary<string,object>, string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception___5yngu4) | private | Writes the item (message with optional event properties and exception) into the log | - | [LogIt(LogLevel, string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.exception___hxtfrf) | private | Writes the item (message with optional exception) into the log | - | [LogIt(LogLevel, string, string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception___1l4ejwt) | private | Writes the item (message with optional exception) with correlation Id into the log | + | [LogIt(LogLevel, Dictionary<string,object>, string, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception-system.string___vo1jng) | private | Writes the item (message with optional event properties and exception) into the log | + | [LogIt(LogLevel, string, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.exception-system.string___17r766x) | private | Writes the item (message with optional exception) into the log | + | [LogIt(LogLevel, string, string, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception-system.string___14n4i77) | private | Writes the item (message with optional exception) with correlation Id into the log | | [Trace(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___1k5wn70) | public | Writes the diagnostic message at the `Trace` level. | | [TraceCorr(string, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.tracecorr_system.string-system.string___1e218kz) | public | Writes the diagnostic message at the `Trace` level with correlation ID | | [Warn(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___8kyvvj) | public | Writes the diagnostic message at the `Warn` level. | @@ -206,7 +206,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net -## LoggerExt.CreateException<TException>(string, Exception) Method ## +## LoggerExt.CreateException<TException>(string, string, Exception) Method ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) @@ -219,11 +219,11 @@ Writes the diagnostic message at the `Fatal` level. Creates and returns the exce ```csharp -private static LoggerExt.TException CreateException(string message, Exception innerException = null) where TException: Exception +private static LoggerExt.TException CreateException(string message, out string stackTrace, Exception innerException = null) where TException: Exception ``` Type parameters
TException
-Method parameters
string message
Log message.
System.Exception innerException
Exception to be logged
+Method parameters
string message
Log message.
string stackTrace
Stack trace to be logged in `StackTrace` event property
System.Exception innerException
Exception to be logged
Return value
net.adamec.lib.common.logging.LoggerExt.TException
Created exception
@@ -237,7 +237,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -263,7 +263,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -289,7 +289,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -315,7 +315,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -341,7 +341,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -368,7 +368,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -394,7 +394,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -420,7 +420,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -447,7 +447,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -474,7 +474,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -526,7 +526,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -561,7 +561,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -587,7 +587,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -613,7 +613,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -639,7 +639,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -666,7 +666,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -692,7 +692,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -718,7 +718,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -745,7 +745,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -772,7 +772,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -807,7 +807,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -842,7 +842,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -868,7 +868,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -894,7 +894,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -916,7 +916,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net -## LoggerExt.LogIt(LogLevel, Dictionary<string,object>, string, Exception) Method ## +## LoggerExt.LogIt(LogLevel, Dictionary<string,object>, string, Exception, string) Method ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) @@ -929,10 +929,10 @@ Writes the item (message with optional event properties and exception) into the ```csharp -private void LogIt(LogLevel level, Dictionary eventProperties, [Localizable(false)] string message, Exception exception = null) +private void LogIt(LogLevel level, Dictionary eventProperties, [Localizable(false)] string message, Exception exception = null, string stackTrace = null) ``` -Method parameters
NLog.LogLevel level
Dictionary<string,object> eventProperties
Event properties (null when no properties are provided)
string message
Log message
System.Exception exception
Optional exception to be logged
+Method parameters
NLog.LogLevel level
Dictionary<string,object> eventProperties
Event properties (null when no properties are provided)
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in `StackTrace` event property when the System.Exception.StackTrace of exception is empty
Return value
void
@@ -942,7 +942,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net -## LoggerExt.LogIt(LogLevel, string, Exception) Method ## +## LoggerExt.LogIt(LogLevel, string, Exception, string) Method ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) @@ -955,10 +955,10 @@ Writes the item (message with optional exception) into the log ```csharp -private void LogIt(LogLevel level, [Localizable(false)] string message, Exception exception = null) +private void LogIt(LogLevel level, [Localizable(false)] string message, Exception exception = null, string stackTrace = null) ``` -Method parameters
NLog.LogLevel level
string message
Log message
System.Exception exception
Optional exception to be logged
+Method parameters
NLog.LogLevel level
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in `StackTrace` event property when the System.Exception.StackTrace of exception is empty
Return value
void
@@ -968,11 +968,11 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net -## LoggerExt.LogIt(LogLevel, string, string, Exception) Method ## +## LoggerExt.LogIt(LogLevel, string, string, Exception, string) Method ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -981,10 +981,10 @@ Writes the item (message with optional exception) with correlation Id into the l ```csharp -private void LogIt(LogLevel level, string correlationId, [Localizable(false)] string message, Exception exception = null) +private void LogIt(LogLevel level, string correlationId, [Localizable(false)] string message, Exception exception = null, string stackTrace = null) ``` -Method parameters
NLog.LogLevel level
string correlationId
Correlation ID
string message
Log message
System.Exception exception
Optional exception to be logged
+Method parameters
NLog.LogLevel level
string correlationId
Correlation ID
string message
Log message
System.Exception exception
Optional exception to be logged
string stackTrace
Optional stack trace to be logged in `StackTrace` event property when the System.Exception.StackTrace of exception is empty
Return value
void
@@ -998,7 +998,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1024,7 +1024,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1050,7 +1050,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1076,7 +1076,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1102,7 +1102,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1128,7 +1128,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) -Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1153,8 +1153,8 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net ## ILogger Interface ## Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs -Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs, App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging)
Logger interface - wrapper around the NLog.ILogger with some additional methods @@ -1169,6 +1169,76 @@ Implemented by: [net.adamec.lib.common.logging.LoggerExt](net.adamec.lib.common. Implements: NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress +### Remarks ### +The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property. Extended logger provides following methods to log with given set of the properties. + + + + + - [Trace(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k) , + - [Debug(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq) , + - [Info(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr) , + - [Warn(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3) , + - [Error(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl) , + - [Fatal(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz) , + - [Warn(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj) , + - [Error(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d) and + - [Fatal(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn) + + + + + + Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The [ErrorPassThrough(Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk) and [FatalPassThrough(Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8) methods will log given exception and return it for further processing. +```csharp + try + { + ... + } + catch (Exception ex){ + if(logger.ErrorPassThrough(ex) is MyException){ + return null; + }else{ + throw; + } + } +``` + In the example above, the exception is always logged and then the decision/action is taken. + + C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns `false` ). Extended logger provides functions [ErrorFltr<TException>(ILogger.TException, string, bool)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm) and [FatalFltr<TException>(ILogger.TException, string, bool)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa) for this purpose. +```csharp + try + { + ... + } + catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){ + //newer called as the default return value of ErrorFltr is false + } +``` + The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it. +```csharp + try + { + ... + } + catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... } + catch (Exception e) when (Logger.FatalFltr(e)) {} +``` + + + Logger can also create and exception, log it and return using functions [Error<TException>(string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh) and [Fatal<TException>(string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73) +```csharp + if(value is null) throw logger.Fatal("Value is null"); +``` + + + When logging an exception using the [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) methods, the event property `StackTrace` is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using `new StackTrace(2, true).ToString()` . In other cases when the System.Exception.StackTrace is null or empty, `new StackTrace(true).ToString()` is used. + + [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property `CorrelationId` . Such methods have the name ending with `Corr` suffix. + + + + ### Methods ### | Name | Modifier | Summary | @@ -1217,7 +1287,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1243,7 +1313,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1269,7 +1339,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1295,7 +1365,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1321,7 +1391,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1348,7 +1418,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1374,7 +1444,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1400,7 +1470,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1427,7 +1497,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1454,7 +1524,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1506,7 +1576,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1541,7 +1611,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1567,7 +1637,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1593,7 +1663,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1619,7 +1689,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1646,7 +1716,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1672,7 +1742,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1698,7 +1768,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1725,7 +1795,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1752,7 +1822,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1787,7 +1857,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1822,7 +1892,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1848,7 +1918,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1874,7 +1944,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1900,7 +1970,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1926,7 +1996,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1952,7 +2022,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -1978,7 +2048,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -2004,7 +2074,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) @@ -2030,7 +2100,7 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net Namespace: [net.adamec.lib.common.logging](net.adamec.lib.common.logging__1g9pm29.md#n-net.adamec.lib.common.logging__1g9pm29) Assembly: net.adamec.lib.common.actor Type: [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) -Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.cs +Sources: App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs Source-only packages: [RadCommons.logging.CommonLogging](src-only-packages--.md#src-only-package--RadCommons.logging.CommonLogging) diff --git a/doc/net.adamec.lib.common.utils__7vdji9.html b/doc/net.adamec.lib.common.utils__7vdji9.html index 8f0ea80..130b2cf 100644 --- a/doc/net.adamec.lib.common.utils__7vdji9.html +++ b/doc/net.adamec.lib.common.utils__7vdji9.html @@ -53,11 +53,21 @@

BaseDi

Inheritance: object
Derived: net.adamec.lib.common.actor.actorsystem.ActorSystem, net.adamec.lib.common.actor.actorsystem.ActorSystemDispatcher, net.adamec.lib.common.actor.actor.Actor, net.adamec.lib.common.actor.actor.SyncActor
Implements: IDisposable

+

Constants

+

NameModifierSummary
Debug(Dictionary<string,object>, string)public abstractWrites the diagnostic message at the Debug level.
+ +
NameValueSummary
DisposedFlag1Internal flag whether the object is fully disposed
+

+

Fields

+ + +
NameModifierSummary
isDisposedprivateThe object is disposed when equals to DisposedFlag
+

Properties

- - - + + +
NameModifierSummary
DisposedpublicFlag whether the object is fully disposed
DisposedManagedpublicFlag whether the managed resources are disposed
DisposedNativepublicFlag whether the native resources are disposed
DisposedpublicReturns
true
when the object is fully disposed
DisposedManagedpublicReturns
true
when the managed resources are disposed
DisposedNativepublicReturns
true
when the native resources are disposed

Destructor

@@ -67,6 +77,7 @@

Destructor

Methods

+ @@ -75,14 +86,36 @@

Methods

Go to namespaces or types or source-only packages

+

BaseDisposable.DisposedFlag Constant

+

Namespace: net.adamec.lib.common.utils
+Assembly: net.adamec.lib.common.actor
+Type: BaseDisposable
+Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
+Source-only packages: RadCommons.utils.BaseDisposable

+

Internal flag whether the object is fully disposed

+
private const int DisposedFlag = 1
+

Field value

int

+

Go to namespaces or types or source-only packages

+

+

BaseDisposable.isDisposed Field

+

Namespace: net.adamec.lib.common.utils
+Assembly: net.adamec.lib.common.actor
+Type: BaseDisposable
+Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
+Source-only packages: RadCommons.utils.BaseDisposable

+

The object is disposed when equals to DisposedFlag

+
private int isDisposed
+

Field value

int

+

Go to namespaces or types or source-only packages

+

BaseDisposable.Disposed Property

Namespace: net.adamec.lib.common.utils
Assembly: net.adamec.lib.common.actor
Type: BaseDisposable
Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
Source-only packages: RadCommons.utils.BaseDisposable

-

Flag whether the object is fully disposed

-
public bool Disposed { get; private set; }
+

Returns

true
when the object is fully disposed

+
public bool Disposed { get; }

Property value

bool

Go to namespaces or types or source-only packages

@@ -92,7 +125,7 @@

BaseDisposable
Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
Source-only packages: RadCommons.utils.BaseDisposable

-

Flag whether the managed resources are disposed

+

Returns

true
when the managed resources are disposed

public bool DisposedManaged { get; private set; }

Property value

bool

Go to namespaces or types or source-only packages

@@ -103,7 +136,7 @@

BaseDisposable
Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
Source-only packages: RadCommons.utils.BaseDisposable

-

Flag whether the native resources are disposed

+

Returns

true
when the native resources are disposed

public bool DisposedNative { get; private set; }

Property value

bool

Go to namespaces or types or source-only packages

@@ -117,6 +150,20 @@

~BaseDisposable()

Go to namespaces or types or source-only packages

+

BaseDisposable.AssertNotDisposed(string) Method

+

Namespace: net.adamec.lib.common.utils
+Assembly: net.adamec.lib.common.actor
+Type: BaseDisposable
+Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
+Source-only packages: RadCommons.utils.BaseDisposable

+

Throws an System.ObjectDisposedException when the current object is disposed

+
protected void AssertNotDisposed(string message = null)
+Method parameters
string message
Optional exception message
+

Return value

void

+

Exceptions

+

System.ObjectDisposedException
Current object is disposed

+

Go to namespaces or types or source-only packages

+

BaseDisposable.Dispose() Method

Namespace: net.adamec.lib.common.utils
Assembly: net.adamec.lib.common.actor
@@ -136,7 +183,7 @@

RadCommons.utils.BaseDisposable

Internal implementation of dispose - free the managed and native resources using the respective methods

protected virtual void Dispose(bool disposing)
-Method parameters
bool disposing
Flag whether the object is disposing (called from Dispose() method). False if called from destructor
+Method parameters
bool disposing
True to dispose both managed and native resources, false to dispose the native resources only

Return value

void

Go to namespaces or types or source-only packages

diff --git a/doc/net.adamec.lib.common.utils__7vdji9.md b/doc/net.adamec.lib.common.utils__7vdji9.md index edbc257..da56181 100644 --- a/doc/net.adamec.lib.common.utils__7vdji9.md +++ b/doc/net.adamec.lib.common.utils__7vdji9.md @@ -35,13 +35,31 @@ Derived: [net.adamec.lib.common.actor.actorsystem.ActorSystem](net.adamec.lib.co Implements: IDisposable +### Constants ### + + | Name | Value | Summary | + | ------ | ------- | --------- | + | [DisposedFlag](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.disposedflag__1kqq0uz) | 1 | Internal flag whether the object is fully disposed | + + + + +### Fields ### + + | Name | Modifier | Summary | + | ------ | ---------- | --------- | + | [isDisposed](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.isdisposed__2u766d) | private | The object is disposed when equals to [DisposedFlag](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.disposedflag__1kqq0uz) | + + + + ### Properties ### | Name | Modifier | Summary | | ------ | ---------- | --------- | - | [Disposed](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposed__nxq2fp) | public | Flag whether the object is fully disposed | - | [DisposedManaged](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposedmanaged__1pm7df6) | public | Flag whether the managed resources are disposed | - | [DisposedNative](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposednative__fqjn7i) | public | Flag whether the native resources are disposed | + | [Disposed](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposed__nxq2fp) | public | Returns ```csharp true ``` when the object is fully disposed | + | [DisposedManaged](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposedmanaged__1pm7df6) | public | Returns ```csharp true ``` when the managed resources are disposed | + | [DisposedNative](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposednative__fqjn7i) | public | Returns ```csharp true ``` when the native resources are disposed | @@ -59,6 +77,7 @@ Implements: System.ObjectDisposedException when the current object is disposed | | [Dispose()](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose__6qe9ri) | public | Dispose the object | | [Dispose(bool)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose_system.boolean___1vzs8w4) | protected | Internal implementation of dispose - free the managed and native resources using the respective methods | | [DisposeManaged()](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.disposemanaged__1ht3p85) | protected | Dispose any disposable managed fields or properties. | @@ -73,6 +92,56 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net +## BaseDisposable.DisposedFlag Constant ## +Namespace: [net.adamec.lib.common.utils](net.adamec.lib.common.utils__7vdji9.md#n-net.adamec.lib.common.utils__7vdji9) +Assembly: net.adamec.lib.common.actor +Type: [BaseDisposable](net.adamec.lib.common.utils__7vdji9.md#t-net.adamec.lib.common.utils.basedisposable__7s72ps) +Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs +Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) + + +Internal flag whether the object is fully disposed + + + +```csharp +private const int DisposedFlag = 1 +``` + +Field value
int
+ + +Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net.adamec.lib.common.actor.md#type-list) or [source-only packages](net.adamec.lib.common.actor.md#package-list) + + + + + +## BaseDisposable.isDisposed Field ## +Namespace: [net.adamec.lib.common.utils](net.adamec.lib.common.utils__7vdji9.md#n-net.adamec.lib.common.utils__7vdji9) +Assembly: net.adamec.lib.common.actor +Type: [BaseDisposable](net.adamec.lib.common.utils__7vdji9.md#t-net.adamec.lib.common.utils.basedisposable__7s72ps) +Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs +Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) + + +The object is disposed when equals to [DisposedFlag](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.disposedflag__1kqq0uz) + + + +```csharp +private int isDisposed +``` + +Field value
int
+ + +Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net.adamec.lib.common.actor.md#type-list) or [source-only packages](net.adamec.lib.common.actor.md#package-list) + + + + + ## BaseDisposable.Disposed Property ## Namespace: [net.adamec.lib.common.utils](net.adamec.lib.common.utils__7vdji9.md#n-net.adamec.lib.common.utils__7vdji9) Assembly: net.adamec.lib.common.actor @@ -81,12 +150,16 @@ Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) -Flag whether the object is fully disposed +Returns +```csharp +true +``` + when the object is fully disposed ```csharp -public bool Disposed { get; private set; } +public bool Disposed { get; } ``` Property value
bool
@@ -106,7 +179,11 @@ Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) -Flag whether the managed resources are disposed +Returns +```csharp +true +``` + when the managed resources are disposed @@ -131,7 +208,11 @@ Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) -Flag whether the native resources are disposed +Returns +```csharp +true +``` + when the native resources are disposed @@ -167,6 +248,36 @@ Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net +## BaseDisposable.AssertNotDisposed(string) Method ## +Namespace: [net.adamec.lib.common.utils](net.adamec.lib.common.utils__7vdji9.md#n-net.adamec.lib.common.utils__7vdji9) +Assembly: net.adamec.lib.common.actor +Type: [BaseDisposable](net.adamec.lib.common.utils__7vdji9.md#t-net.adamec.lib.common.utils.basedisposable__7s72ps) +Sources: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs +Source-only packages: [RadCommons.utils.BaseDisposable](src-only-packages--.md#src-only-package--RadCommons.utils.BaseDisposable) + + +Throws an System.ObjectDisposedException when the current object is disposed + + + +```csharp +protected void AssertNotDisposed(string message = null) +``` + +Method parameters
string message
Optional exception message
+Return value
void
+ + +### Exceptions ### +
System.ObjectDisposedException
Current object is disposed
+ + +Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net.adamec.lib.common.actor.md#type-list) or [source-only packages](net.adamec.lib.common.actor.md#package-list) + + + + + ## BaseDisposable.Dispose() Method ## Namespace: [net.adamec.lib.common.utils](net.adamec.lib.common.utils__7vdji9.md#n-net.adamec.lib.common.utils__7vdji9) Assembly: net.adamec.lib.common.actor @@ -208,7 +319,7 @@ Internal implementation of dispose - free the managed and native resources using protected virtual void Dispose(bool disposing) ``` -Method parameters
bool disposing
Flag whether the object is disposing (called from [Dispose()](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose__6qe9ri) method). False if called from destructor
+Method parameters
bool disposing
True to dispose both managed and native resources, false to dispose the native resources only
Return value
void
diff --git a/doc/src-only-packages--.html b/doc/src-only-packages--.html index 98f3fbe..e39a052 100644 --- a/doc/src-only-packages--.html +++ b/doc/src-only-packages--.html @@ -50,8 +50,35 @@

RadCommo Declaring file: App_Packages\RadCommons.logging.CommonLogging\_SourceOnlyPackage.cs

RadCommons logging wrapper around NLog with some extended functionality (Source only package).

References needed

NLog

-

Package members

CommonLogging (Type)
ILogger factory
CreateLogger(string) (Method)
Creates the logger with given categoryName
CreateLogger(Type) (Method)
Creates the logger for given type. The name of the logger will be System.Type.FullName
CreateLogger<T>() (Method)
Creates the logger for given type. The name of the logger will be System.Type.FullName
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
Trace(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Trace level.
Debug(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Debug level.
Info(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Info level.
Warn(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Fatal level.
Warn(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Fatal level.
ErrorPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Error level and returns given exception
FatalPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Fatal level and returns given exception
Error<TException>(string, Exception) (Method)
Writes the diagnostic message at the Error level. Creates and returns the exception of given type
Fatal<TException>(string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
ErrorFltr<TException>(ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltr<TException>(ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
TraceCorr(string, string) (Method)
Writes the diagnostic message at the Trace level with correlation ID.
DebugCorr(string, string) (Method)
Writes the diagnostic message at the Debug level with correlation ID.
InfoCorr(string, string) (Method)
Writes the diagnostic message at the Info level with correlation ID.
WarnCorr(string, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
WarnCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
ErrorCorr<TException>(string, ILogger.TException, string) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalCorr<TException>(string, ILogger.TException, string) (Method)
Writes the diagnostic message at the Fatal level and returns the exception of given type
ErrorCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type
FatalCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type
ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
LoggerExt (Type)
ILogger extensions
Trace(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Trace level.
Debug(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Debug level.
Info(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Info level.
Warn(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Fatal level.
Warn(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Fatal level.
ErrorPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Error level and returns given exception
FatalPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Fatal level and returns given exception >
Error<TException>(string, Exception) (Method)
Writes the diagnostic message at the Error level. Creates and returns the exception of given type
Fatal<TException>(string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
CreateException<TException>(string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
ErrorFltr<TException>(LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltr<TException>(LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
TraceCorr(string, string) (Method)
Writes the diagnostic message at the Trace level with correlation ID
DebugCorr(string, string) (Method)
Writes the diagnostic message at the Debug level with correlation ID.
InfoCorr(string, string) (Method)
Writes the diagnostic message at the Info level with correlation ID.
WarnCorr(string, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
WarnCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
ErrorCorr<TException>(string, LoggerExt.TException, string) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalCorr<TException>(string, LoggerExt.TException, string) (Method)
Writes the diagnostic message at the Fatal level and returns the exception of given type
ErrorCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type
FatalCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type
ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
LogIt(LogLevel, string, Exception) (Method)
Writes the item (message with optional exception) into the log
LogIt(LogLevel, string, string, Exception) (Method)
Writes the item (message with optional exception) with correlation Id into the log
LogIt(LogLevel, Dictionary<string,object>, string, Exception) (Method)
Writes the item (message with optional event properties and exception) into the log

-

Sources

App_Packages\RadCommons.logging.CommonLogging\_SourceOnlyPackage.cs
App_Packages\RadCommons.logging.CommonLogging\CommonLogging.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs

+

Remarks

+

The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property.

Extended logger provides following methods to log with given set of the properties.

+ + + +

Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The ErrorPassThrough(Exception, string) and FatalPassThrough(Exception, string) methods will log given exception and return it for further processing.

    try
+    {
+      ...
+    }
+    catch (Exception ex){
+       if(logger.ErrorPassThrough(ex) is MyException){
+         return null;
+       }else{
+         throw;
+       } 
+    }
In the example above, the exception is always logged and then the decision/action is taken.

C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns false ). Extended logger provides functions ErrorFltr<TException>(ILogger.TException, string, bool) and FatalFltr<TException>(ILogger.TException, string, bool) for this purpose.

    try
+    {
+      ...
+    }
+    catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
+      //newer called as the default return value of ErrorFltr is false     
+    }
The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
    try
+    {
+      ...
+    }
+    catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... }
+    catch (Exception e) when (Logger.FatalFltr(e)) {}

Logger can also create and exception, log it and return using functions Error<TException>(string, Exception) and Fatal<TException>(string, Exception)

    if(value is null) throw logger.Fatal<ArgumentNullException>("Value is null");

When logging an exception using the LoggerExt methods, the event property StackTrace is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using new StackTrace(2, true).ToString() . In other cases when the System.Exception.StackTrace is null or empty, new StackTrace(true).ToString() is used.

LoggerExt also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property CorrelationId . Such methods have the name ending with Corr suffix.

+

Package members

CommonLogging (Type)
ILogger factory
CreateLogger(string) (Method)
Creates the logger with given categoryName
CreateLogger(Type) (Method)
Creates the logger for given type. The name of the logger will be System.Type.FullName
CreateLogger<T>() (Method)
Creates the logger for given type. The name of the logger will be System.Type.FullName
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
TraceCorr(string, string) (Method)
Writes the diagnostic message at the Trace level with correlation ID.
DebugCorr(string, string) (Method)
Writes the diagnostic message at the Debug level with correlation ID.
InfoCorr(string, string) (Method)
Writes the diagnostic message at the Info level with correlation ID.
WarnCorr(string, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
WarnCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
ErrorCorr<TException>(string, ILogger.TException, string) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalCorr<TException>(string, ILogger.TException, string) (Method)
Writes the diagnostic message at the Fatal level and returns the exception of given type
ErrorCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type
FatalCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type
ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
Trace(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Trace level.
Debug(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Debug level.
Info(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Info level.
Warn(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Fatal level.
Warn(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Fatal level.
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
ErrorFltr<TException>(ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltr<TException>(ILogger.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
ErrorPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Error level and returns given exception
FatalPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Fatal level and returns given exception
Error<TException>(string, Exception) (Method)
Writes the diagnostic message at the Error level. Creates and returns the exception of given type
Fatal<TException>(string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
ILogger (Type)
Logger interface - wrapper around the NLog.ILogger with some additional methods
LoggerExt (Type)
Extended logger implementing ILogger
TraceCorr(string, string) (Method)
Writes the diagnostic message at the Trace level with correlation ID
DebugCorr(string, string) (Method)
Writes the diagnostic message at the Debug level with correlation ID.
InfoCorr(string, string) (Method)
Writes the diagnostic message at the Info level with correlation ID.
WarnCorr(string, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
WarnCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Warn level with correlation ID.
ErrorCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Error level with correlation ID.
FatalCorr(string, Exception, string) (Method)
Writes the diagnostic message at the Fatal level with correlation ID.
ErrorCorr<TException>(string, LoggerExt.TException, string) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalCorr<TException>(string, LoggerExt.TException, string) (Method)
Writes the diagnostic message at the Fatal level and returns the exception of given type
ErrorCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Error level with correlation ID. Creates and returns the exception of given type
FatalCorr<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Fatal level with correlation ID. Creates and returns the exception of given type
ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
LogIt(LogLevel, string, string, Exception, string) (Method)
Writes the item (message with optional exception) with correlation Id into the log
LoggerExt (Type)
Extended logger implementing ILogger
Trace(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Trace level.
Debug(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Debug level.
Info(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Info level.
Warn(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, string) (Method)
Writes the diagnostic message at the Fatal level.
Warn(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Warn level.
Error(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Error level.
Fatal(Dictionary<string,object>, Exception, string) (Method)
Writes the diagnostic message at the Fatal level.
LoggerExt (Type)
Extended logger implementing ILogger
ErrorFltr<TException>(LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Error level and returns the exception of given type
FatalFltr<TException>(LoggerExt.TException, string, bool) (Method)
Writes the diagnostic message at the Fatal level and returns catchIt value.
LoggerExt (Type)
Extended logger implementing ILogger
ErrorPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Error level and returns given exception
FatalPassThrough(Exception, string) (Method)
Writes the diagnostic message at the Fatal level and returns given exception >
Error<TException>(string, Exception) (Method)
Writes the diagnostic message at the Error level. Creates and returns the exception of given type
Fatal<TException>(string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
LoggerExt (Type)
Extended logger implementing ILogger
CreateException<TException>(string, string, Exception) (Method)
Writes the diagnostic message at the Fatal level. Creates and returns the exception of given type
LogIt(LogLevel, string, Exception, string) (Method)
Writes the item (message with optional exception) into the log
LogIt(LogLevel, Dictionary<string,object>, string, Exception, string) (Method)
Writes the item (message with optional event properties and exception) into the log

+

Sources

App_Packages\RadCommons.logging.CommonLogging\_SourceOnlyPackage.cs
App_Packages\RadCommons.logging.CommonLogging\CommonLogging.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs

Go to namespaces or types or source-only packages

RadCommons.utils.BaseDisposable Source only package

@@ -59,7 +86,7 @@

RadCommon Includes: None
Declaring file: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs

Helper class for implementation of IDisposable types (Source only package).

-

Package members

BaseDisposable (Type)
Helper class for implementation of System.IDisposable types
Disposed (Property)
Flag whether the object is fully disposed
DisposedManaged (Property)
Flag whether the managed resources are disposed
DisposedNative (Property)
Flag whether the native resources are disposed
Dispose() (Method)
Dispose the object
Dispose(bool) (Method)
Internal implementation of dispose - free the managed and native resources using the respective methods
DisposeManaged() (Method)
Dispose any disposable managed fields or properties.
DisposeNative() (Method)
Dispose of COM objects, Handles, etc. Then set those objects to null.
~BaseDisposable() (Method)

+

Package members

BaseDisposable (Type)
Helper class for implementation of System.IDisposable types
DisposedFlag (Field)
Internal flag whether the object is fully disposed
isDisposed (Field)
The object is disposed when equals to DisposedFlag
Disposed (Property)
Returns
true
when the object is fully disposed
DisposedManaged (Property)
Returns
true
when the managed resources are disposed
DisposedNative (Property)
Returns
true
when the native resources are disposed
Dispose() (Method)
Dispose the object
Dispose(bool) (Method)
Internal implementation of dispose - free the managed and native resources using the respective methods
DisposeManaged() (Method)
Dispose any disposable managed fields or properties.
DisposeNative() (Method)
Dispose of COM objects, Handles, etc. Then set those objects to null.
~BaseDisposable() (Method)
AssertNotDisposed(string) (Method)
Throws an System.ObjectDisposedException when the current object is disposed

Sources

App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs

Go to namespaces or types or source-only packages

diff --git a/doc/src-only-packages--.md b/doc/src-only-packages--.md index e09e95b..6b1eb79 100644 --- a/doc/src-only-packages--.md +++ b/doc/src-only-packages--.md @@ -32,10 +32,80 @@ RadCommons logging wrapper around NLog with some extended functionality (Source References needed
NLog
-Package members
[CommonLogging (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.commonlogging__1dar5wb)
[ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) factory
[CreateLogger(string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger_system.string___wn77if)
Creates the logger with given categoryName
[CreateLogger(Type) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger_system.type___uhum9e)
Creates the logger for given type. The name of the logger will be System.Type.FullName
[CreateLogger<T>() (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger--1__lp2vax)
Creates the logger for given type. The name of the logger will be System.Type.FullName
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[Trace(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k)
Writes the diagnostic message at the `Trace` level.
[Debug(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq)
Writes the diagnostic message at the `Debug` level.
[Info(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr)
Writes the diagnostic message at the `Info` level.
[Warn(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz)
Writes the diagnostic message at the `Fatal` level.
[Warn(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn)
Writes the diagnostic message at the `Fatal` level.
[ErrorPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk)
Writes the diagnostic message at the `Error` level and returns given exception
[FatalPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8)
Writes the diagnostic message at the `Fatal` level and returns given exception
[Error<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh)
Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type
[Fatal<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[ErrorFltr<TException>(ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltr<TException>(ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[TraceCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.tracecorr_system.string-system.string___1bdni2z)
Writes the diagnostic message at the `Trace` level with correlation ID.
[DebugCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debugcorr_system.string-system.string___aozvfj)
Writes the diagnostic message at the `Debug` level with correlation ID.
[InfoCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.infocorr_system.string-system.string___2iypny)
Writes the diagnostic message at the `Info` level with correlation ID.
[WarnCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.string___pr2tiu)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.string___coifvu)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.string___ufcx32)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[WarnCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.exception-system.string___1kh0i9m)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.exception-system.string___1qll13u)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.exception-system.string___yt34nm)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[ErrorCorr<TException>(string, ILogger.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string---0-system.string___eypxkv)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalCorr<TException>(string, ILogger.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string---0-system.string___108vdu1)
Writes the diagnostic message at the `Fatal` level and returns the exception of given type
[ErrorCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string-system.string-system.exception___91akh7)
Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type
[FatalCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string-system.string-system.exception___1hlu7x)
Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type
[ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___1spds2w)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___a9m338)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
[ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) extensions
[Trace(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___1k5wn70)
Writes the diagnostic message at the `Trace` level.
[Debug(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___by66ma)
Writes the diagnostic message at the `Debug` level.
[Info(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1qxds6b)
Writes the diagnostic message at the `Info` level.
[Warn(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___wuc2dz)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.string___u5pc5h)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1ff2uef)
Writes the diagnostic message at the `Fatal` level.
[Warn(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___8kyvvj)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___7fy00h)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___pw9hcn)
Writes the diagnostic message at the `Fatal` level.
[ErrorPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorpassthrough_system.exception-system.string___1ey2kd0)
Writes the diagnostic message at the `Error` level and returns given exception
[FatalPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalpassthrough_system.exception-system.string___10psm2o)
Writes the diagnostic message at the `Fatal` level and returns given exception >
[Error<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error--1_system.string-system.exception___1qowqgx)
Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type
[Fatal<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal--1_system.string-system.exception___1myw0tj)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[CreateException<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.createexception--1_system.string-system.exception___1wtd924)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[ErrorFltr<TException>(LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltr<TException>(LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalfltr--1_--0-system.string-system.boolean___5rdjqe)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[TraceCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.tracecorr_system.string-system.string___1e218kz)
Writes the diagnostic message at the `Trace` level with correlation ID
[DebugCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debugcorr_system.string-system.string___i119af)
Writes the diagnostic message at the `Debug` level with correlation ID.
[InfoCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.infocorr_system.string-system.string___3vobha)
Writes the diagnostic message at the `Info` level with correlation ID.
[WarnCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.string___cfr64e)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.string___1vt0qk2)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.string___c131ta)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[WarnCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.exception-system.string___sfdb1u)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.exception-system.string___1tdd1hu)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.exception-system.string___1q1adwi)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[ErrorCorr<TException>(string, LoggerExt.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string---0-system.string___bk3vj3)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalCorr<TException>(string, LoggerExt.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string---0-system.string___17i1735)
Writes the diagnostic message at the `Fatal` level and returns the exception of given type
[ErrorCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string-system.string-system.exception___4hcjn7)
Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type
[FatalCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string-system.string-system.exception___w1l5gt)
Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type
[ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorfltrcorr--1_system.string---0-system.string-system.boolean___84xqu8)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalfltrcorr--1_system.string---0-system.string-system.boolean___15t2hh0)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[LogIt(LogLevel, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.exception___hxtfrf)
Writes the item (message with optional exception) into the log
[LogIt(LogLevel, string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception___1l4ejwt)
Writes the item (message with optional exception) with correlation Id into the log
[LogIt(LogLevel, Dictionary<string,object>, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception___5yngu4)
Writes the item (message with optional event properties and exception) into the log
+### Remarks ### +The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property. Extended logger provides following methods to log with given set of the properties. + + + + + - [Trace(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k) , + - [Debug(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq) , + - [Info(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr) , + - [Warn(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3) , + - [Error(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl) , + - [Fatal(Dictionary<string,object>, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz) , + - [Warn(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj) , + - [Error(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d) and + - [Fatal(Dictionary<string,object>, Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn) + + + + + + Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The [ErrorPassThrough(Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk) and [FatalPassThrough(Exception, string)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8) methods will log given exception and return it for further processing. +```csharp + try + { + ... + } + catch (Exception ex){ + if(logger.ErrorPassThrough(ex) is MyException){ + return null; + }else{ + throw; + } + } +``` + In the example above, the exception is always logged and then the decision/action is taken. + + C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns `false` ). Extended logger provides functions [ErrorFltr<TException>(ILogger.TException, string, bool)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm) and [FatalFltr<TException>(ILogger.TException, string, bool)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa) for this purpose. +```csharp + try + { + ... + } + catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){ + //newer called as the default return value of ErrorFltr is false + } +``` + The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it. +```csharp + try + { + ... + } + catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... } + catch (Exception e) when (Logger.FatalFltr(e)) {} +``` + + + Logger can also create and exception, log it and return using functions [Error<TException>(string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh) and [Fatal<TException>(string, Exception)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73) +```csharp + if(value is null) throw logger.Fatal("Value is null"); +``` + + + When logging an exception using the [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) methods, the event property `StackTrace` is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using `new StackTrace(2, true).ToString()` . In other cases when the System.Exception.StackTrace is null or empty, `new StackTrace(true).ToString()` is used. + + [LoggerExt](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2) also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property `CorrelationId` . Such methods have the name ending with `Corr` suffix. + + + + +Package members
[CommonLogging (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.commonlogging__1dar5wb)
[ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm) factory
[CreateLogger(string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger_system.string___wn77if)
Creates the logger with given categoryName
[CreateLogger(Type) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger_system.type___uhum9e)
Creates the logger for given type. The name of the logger will be System.Type.FullName
[CreateLogger<T>() (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.commonlogging.createlogger--1__lp2vax)
Creates the logger for given type. The name of the logger will be System.Type.FullName
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[TraceCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.tracecorr_system.string-system.string___1bdni2z)
Writes the diagnostic message at the `Trace` level with correlation ID.
[DebugCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debugcorr_system.string-system.string___aozvfj)
Writes the diagnostic message at the `Debug` level with correlation ID.
[InfoCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.infocorr_system.string-system.string___2iypny)
Writes the diagnostic message at the `Info` level with correlation ID.
[WarnCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.string___pr2tiu)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.string___coifvu)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.string___ufcx32)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[WarnCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.exception-system.string___1kh0i9m)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.exception-system.string___1qll13u)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.exception-system.string___yt34nm)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[ErrorCorr<TException>(string, ILogger.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string---0-system.string___eypxkv)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalCorr<TException>(string, ILogger.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string---0-system.string___108vdu1)
Writes the diagnostic message at the `Fatal` level and returns the exception of given type
[ErrorCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string-system.string-system.exception___91akh7)
Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type
[FatalCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string-system.string-system.exception___1hlu7x)
Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type
[ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___1spds2w)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltrCorr<TException>(string, ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___a9m338)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[Trace(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k)
Writes the diagnostic message at the `Trace` level.
[Debug(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq)
Writes the diagnostic message at the `Debug` level.
[Info(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr)
Writes the diagnostic message at the `Info` level.
[Warn(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz)
Writes the diagnostic message at the `Fatal` level.
[Warn(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn)
Writes the diagnostic message at the `Fatal` level.
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[ErrorFltr<TException>(ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltr<TException>(ILogger.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[ErrorPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk)
Writes the diagnostic message at the `Error` level and returns given exception
[FatalPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8)
Writes the diagnostic message at the `Fatal` level and returns given exception
[Error<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh)
Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type
[Fatal<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[ILogger (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
Logger interface - wrapper around the NLog.ILogger with some additional methods
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
[TraceCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.tracecorr_system.string-system.string___1e218kz)
Writes the diagnostic message at the `Trace` level with correlation ID
[DebugCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debugcorr_system.string-system.string___i119af)
Writes the diagnostic message at the `Debug` level with correlation ID.
[InfoCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.infocorr_system.string-system.string___3vobha)
Writes the diagnostic message at the `Info` level with correlation ID.
[WarnCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.string___cfr64e)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.string___1vt0qk2)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.string___c131ta)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[WarnCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.exception-system.string___sfdb1u)
Writes the diagnostic message at the `Warn` level with correlation ID.
[ErrorCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.exception-system.string___1tdd1hu)
Writes the diagnostic message at the `Error` level with correlation ID.
[FatalCorr(string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.exception-system.string___1q1adwi)
Writes the diagnostic message at the `Fatal` level with correlation ID.
[ErrorCorr<TException>(string, LoggerExt.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string---0-system.string___bk3vj3)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalCorr<TException>(string, LoggerExt.TException, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string---0-system.string___17i1735)
Writes the diagnostic message at the `Fatal` level and returns the exception of given type
[ErrorCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string-system.string-system.exception___4hcjn7)
Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type
[FatalCorr<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string-system.string-system.exception___w1l5gt)
Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type
[ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorfltrcorr--1_system.string---0-system.string-system.boolean___84xqu8)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalfltrcorr--1_system.string---0-system.string-system.boolean___15t2hh0)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[LogIt(LogLevel, string, string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception-system.string___14n4i77)
Writes the item (message with optional exception) with correlation Id into the log
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
[Trace(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___1k5wn70)
Writes the diagnostic message at the `Trace` level.
[Debug(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___by66ma)
Writes the diagnostic message at the `Debug` level.
[Info(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1qxds6b)
Writes the diagnostic message at the `Info` level.
[Warn(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___wuc2dz)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.string___u5pc5h)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1ff2uef)
Writes the diagnostic message at the `Fatal` level.
[Warn(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___8kyvvj)
Writes the diagnostic message at the `Warn` level.
[Error(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___7fy00h)
Writes the diagnostic message at the `Error` level.
[Fatal(Dictionary<string,object>, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___pw9hcn)
Writes the diagnostic message at the `Fatal` level.
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
[ErrorFltr<TException>(LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa)
Writes the diagnostic message at the `Error` level and returns the exception of given type
[FatalFltr<TException>(LoggerExt.TException, string, bool) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalfltr--1_--0-system.string-system.boolean___5rdjqe)
Writes the diagnostic message at the `Fatal` level and returns catchIt value.
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
[ErrorPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.errorpassthrough_system.exception-system.string___1ey2kd0)
Writes the diagnostic message at the `Error` level and returns given exception
[FatalPassThrough(Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatalpassthrough_system.exception-system.string___10psm2o)
Writes the diagnostic message at the `Fatal` level and returns given exception >
[Error<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.error--1_system.string-system.exception___1qowqgx)
Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type
[Fatal<TException>(string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.fatal--1_system.string-system.exception___1myw0tj)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[LoggerExt (Type)](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.loggerext__ac9km2)
Extended logger implementing [ILogger](net.adamec.lib.common.logging__1g9pm29.md#t-net.adamec.lib.common.logging.ilogger__y2ollm)
[CreateException<TException>(string, string, Exception) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.createexception--1_system.string-system.string--system.exception___1kt7m7i)
Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
[LogIt(LogLevel, string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.exception-system.string___17r766x)
Writes the item (message with optional exception) into the log
[LogIt(LogLevel, Dictionary<string,object>, string, Exception, string) (Method)](net.adamec.lib.common.logging__1g9pm29.md#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception-system.string___vo1jng)
Writes the item (message with optional event properties and exception) into the log
-Sources
App_Packages\RadCommons.logging.CommonLogging\_SourceOnlyPackage.cs
App_Packages\RadCommons.logging.CommonLogging\CommonLogging.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
+Sources
App_Packages\RadCommons.logging.CommonLogging\_SourceOnlyPackage.cs
App_Packages\RadCommons.logging.CommonLogging\CommonLogging.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.CorrelationId.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.EventProperties.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionFilter.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.ExceptionPassThrough.cs
App_Packages\RadCommons.logging.CommonLogging\ILogger.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.CorrelationId.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.EventProperties.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionFilter.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.ExceptionPassThrough.cs
App_Packages\RadCommons.logging.CommonLogging\LoggerExt.cs
Go to [namespaces](net.adamec.lib.common.actor.md#namespace-list) or [types](net.adamec.lib.common.actor.md#type-list) or [source-only packages](net.adamec.lib.common.actor.md#package-list) @@ -53,7 +123,19 @@ Declaring file: App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.csPackage members
[BaseDisposable (Type)](net.adamec.lib.common.utils__7vdji9.md#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
Helper class for implementation of System.IDisposable types
[Disposed (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposed__nxq2fp)
Flag whether the object is fully disposed
[DisposedManaged (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposedmanaged__1pm7df6)
Flag whether the managed resources are disposed
[DisposedNative (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposednative__fqjn7i)
Flag whether the native resources are disposed
[Dispose() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose__6qe9ri)
Dispose the object
[Dispose(bool) (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose_system.boolean___1vzs8w4)
Internal implementation of dispose - free the managed and native resources using the respective methods
[DisposeManaged() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.disposemanaged__1ht3p85)
Dispose any disposable managed fields or properties.
[DisposeNative() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.disposenative__uaa3i9)
Dispose of COM objects, Handles, etc. Then set those objects to null.
[~BaseDisposable() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.finalize__1l3n8dl)
+Package members
[BaseDisposable (Type)](net.adamec.lib.common.utils__7vdji9.md#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
Helper class for implementation of System.IDisposable types
[DisposedFlag (Field)](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.disposedflag__1kqq0uz)
Internal flag whether the object is fully disposed
[isDisposed (Field)](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.isdisposed__2u766d)
The object is disposed when equals to [DisposedFlag](net.adamec.lib.common.utils__7vdji9.md#f-net.adamec.lib.common.utils.basedisposable.disposedflag__1kqq0uz)
[Disposed (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposed__nxq2fp)
Returns +```csharp +true +``` + when the object is fully disposed
[DisposedManaged (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposedmanaged__1pm7df6)
Returns +```csharp +true +``` + when the managed resources are disposed
[DisposedNative (Property)](net.adamec.lib.common.utils__7vdji9.md#p-net.adamec.lib.common.utils.basedisposable.disposednative__fqjn7i)
Returns +```csharp +true +``` + when the native resources are disposed
[Dispose() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose__6qe9ri)
Dispose the object
[Dispose(bool) (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.dispose_system.boolean___1vzs8w4)
Internal implementation of dispose - free the managed and native resources using the respective methods
[DisposeManaged() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.disposemanaged__1ht3p85)
Dispose any disposable managed fields or properties.
[DisposeNative() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.disposenative__uaa3i9)
Dispose of COM objects, Handles, etc. Then set those objects to null.
[~BaseDisposable() (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.finalize__1l3n8dl)
[AssertNotDisposed(string) (Method)](net.adamec.lib.common.utils__7vdji9.md#m-net.adamec.lib.common.utils.basedisposable.assertnotdisposed_system.string___18xs7ya)
Throws an System.ObjectDisposedException when the current object is disposed
Sources
App_Packages\RadCommons.utils.BaseDisposable\BaseDisposable.cs
diff --git a/net.adamec.lib.common.actor/net.adamec.lib.common.actor.csproj b/net.adamec.lib.common.actor/net.adamec.lib.common.actor.csproj index 3517d2e..05415d4 100644 --- a/net.adamec.lib.common.actor/net.adamec.lib.common.actor.csproj +++ b/net.adamec.lib.common.actor/net.adamec.lib.common.actor.csproj @@ -23,15 +23,15 @@ - + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers

NameModifierSummary
AssertNotDisposed(string)protectedThrows an System.ObjectDisposedException when the current object is disposed
Dispose()publicDispose the object
Dispose(bool)protectedInternal implementation of dispose - free the managed and native resources using the respective methods
DisposeManaged()protectedDispose any disposable managed fields or properties.