Adds a event to the log. When logging fails, the event is forwarded to the
FallbackProvider, if any.
Namespace:
CuttingEdge.LoggingAssembly: CuttingEdge.Logging (in CuttingEdge.Logging.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Private Function Log ( _ entry As LogEntry _ ) As Object Implements ILogger.Log |
| C# |
|---|
Object ILogger.Log( LogEntry entry ) |
| Visual C++ |
|---|
private: virtual Object^ Log( LogEntry^ entry ) sealed = ILogger::Log |
| JavaScript |
|---|
|
Parameters
- entry
- Type: CuttingEdge.Logging..::.LogEntry
The entry to log.
Return Value
The id of the logged event or null in one of the following reasons: The event hasn't been logged, because of the current Threshold level; Returning an id is not supported by the current implementation; The event has been logged to a fallback provider, because of an error in the current implementation.Implements
ILogger..::.Log(LogEntry)
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown when the given entry is a null reference. |
| System..::.Exception | Thrown when the logging provider failed to log the event. The exact type of exception thrown depends on the actual provider implementation. See documentation of the LogInternal(LogEntry) method for more information. |
| System..::.InvalidOperationException | Thrown when the provider is not initialized correctly. This can happen when the provider is manually created using the default constructor without calling Initialize(String, NameValueCollection). Initialize the provider using an overloaded constructor or configure it in the application's configuration file. |