Search Results for

    Show / Hide Table of Contents

    Class ALog

    A class that is used to log diagnostic messages to the underlying logging framework. WorkerSystem, all workers, and all input and output ports have a Logger property with an ALog instance initialized with the corresponding Locator string as its name.

    This Logger property is the normal way for workers and the library user to log messages. ALog logger instances can also be created outside any worker system by using NLogFactory.

    Inheritance
    Object
    ALog
    Namespace: actionETL.Logging
    Assembly: actionETL.dll
    Syntax
    public class ALog

    Properties

    Factory

    Gets the factory that created this instance.

    This property is thread-safe.

    Declaration
    public IALogFactory Factory { get; }
    Property Value
    Type Description
    IALogFactory

    The factory.

    IsDebugEnabled

    Gets a value indicating whether logging is enabled for the Debug level.

    This property is thread-safe.

    Declaration
    public bool IsDebugEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Debug level, otherwise false.

    IsErrorEnabled

    Gets a value indicating whether logging is enabled for the Error level.

    This property is thread-safe.

    Declaration
    public bool IsErrorEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Error level, otherwise false.

    IsFatalEnabled

    Gets a value indicating whether logging is enabled for the Fatal level.

    This property is thread-safe.

    Declaration
    public bool IsFatalEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Fatal level, otherwise false.

    IsInfoEnabled

    Gets a value indicating whether logging is enabled for the Info level.

    This property is thread-safe.

    Declaration
    public bool IsInfoEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Info level, otherwise false.

    IsTraceEnabled

    Gets a value indicating whether logging is enabled for the Trace level.

    This property is thread-safe.

    Declaration
    public bool IsTraceEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Trace level, otherwise false.

    IsWarnEnabled

    Gets a value indicating whether logging is enabled for the Warn level.

    This property is thread-safe.

    Declaration
    public bool IsWarnEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if logging is enabled for the Warn level, otherwise false.

    Methods

    ConditionalDebug(ALogMessageCallback, String)

    Logs a conditional Debug message if the caller has the DEBUG conditional compilation symbol defined. Use the Conditional* overloads where the overhead of calling the logging method should be avoided in release builds.

    This method is thread-safe.

    Declaration
    [Conditional("DEBUG")]
    public void ConditionalDebug(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    ConditionalDebug(String)

    Logs a conditional Debug message if the caller has the DEBUG conditional compilation symbol defined. Use the Conditional* overloads where the overhead of calling the logging method should be avoided in release builds.

    This method is thread-safe.

    Declaration
    [Conditional("DEBUG")]
    public void ConditionalDebug(string category)
    Parameters
    Type Name Description
    String category

    The category.

    ConditionalDebug(String, Exception, String)

    Logs a conditional Debug message if the caller has the DEBUG conditional compilation symbol defined. Use the Conditional* overloads where the overhead of calling the logging method should be avoided in release builds.

    This method is thread-safe.

    Declaration
    [Conditional("DEBUG")]
    public void ConditionalDebug(string category, Exception exception, string message)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    ConditionalDebug(String, String)

    Logs a conditional Debug message if the caller has the DEBUG conditional compilation symbol defined. Use the Conditional* overloads where the overhead of calling the logging method should be avoided in release builds.

    This method is thread-safe.

    Declaration
    [Conditional("DEBUG")]
    public void ConditionalDebug(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    Debug(ALogMessageCallback, String)

    Logs a Debug message.

    This method is thread-safe.

    Declaration
    public void Debug(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Debug(String)

    Logs a Debug message.

    This method is thread-safe.

    Declaration
    public void Debug(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Debug(String, Exception, String)

    Logs a Debug message.

    This method is thread-safe.

    Declaration
    public void Debug(string category, Exception exception, string message)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    Debug(String, String)

    Logs a Debug message.

    This method is thread-safe.

    Declaration
    public void Debug(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    Error(ALogMessageCallback, String)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Error(ALogMessageCallback, String, Exception)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(ALogMessageCallback messageFunc, string category, Exception exception)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Exception exception

    The exception.

    Error(String)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Error(String, Exception)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(string category, Exception exception)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    Error(String, Exception, String)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(string category, Exception exception, string message)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    Error(String, String)

    Logs an Error message.

    This method is thread-safe.

    Declaration
    public void Error(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    Fatal(ALogMessageCallback, String)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Fatal(ALogMessageCallback, String, Exception)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(ALogMessageCallback messageFunc, string category, Exception exception)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Exception exception

    The exception.

    Fatal(String)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Fatal(String, Exception)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(string category, Exception exception)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    Fatal(String, Exception, String)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(string category, Exception exception, string message)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    Fatal(String, String)

    Logs a Fatal message.

    This method is thread-safe.

    Declaration
    public void Fatal(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    Info(ALogMessageCallback, String)

    Logs an Info message.

    This method is thread-safe.

    Declaration
    public void Info(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Info(String)

    Logs an Info message.

    This method is thread-safe.

    Declaration
    public void Info(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Info(String, String)

    Logs an Info message.

    This method is thread-safe.

    Declaration
    public void Info(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    IsEnabled(ALogLevel)

    Gets a value indicating whether logging is enabled for the specified level.

    This method is thread-safe.

    Declaration
    public bool IsEnabled(ALogLevel logLevel)
    Parameters
    Type Name Description
    ALogLevel logLevel

    The log level to check.

    Returns
    Type Description
    Boolean

    true if the specified log level is enabled; otherwise false.

    Log(IOutcomeStatus)

    Logs the specified OutcomeStatus at the appropriate level.

    This method is thread-safe.

    Declaration
    public void Log(IOutcomeStatus outcomeStatus)
    Parameters
    Type Name Description
    IOutcomeStatus outcomeStatus

    The outcome status.

    Exceptions
    Type Condition
    ArgumentNullException

    outcomeStatus

    Log(ALogLevel, String)

    Logs a message at the specified log level.

    This method is thread-safe.

    Declaration
    public void Log(ALogLevel logLevel, string category)
    Parameters
    Type Name Description
    ALogLevel logLevel

    The log level.

    String category

    The category.

    Log(ALogLevel, String, Exception)

    Logs a message at the specified log level.

    This method is thread-safe.

    Declaration
    public void Log(ALogLevel logLevel, string category, Exception exception)
    Parameters
    Type Name Description
    ALogLevel logLevel

    The log level.

    String category

    The category.

    Exception exception

    The exception.

    Log(ALogLevel, String, Exception, String)

    Logs a message at the specified log level.

    This method is thread-safe.

    Declaration
    public void Log(ALogLevel logLevel, string category, Exception exception, string message)
    Parameters
    Type Name Description
    ALogLevel logLevel

    The log level.

    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    Log(ALogMessageCallback, ALogLevel, String)

    Logs a message at the specified log level.

    This method is thread-safe.

    Declaration
    public void Log(ALogMessageCallback messageFunc, ALogLevel logLevel, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    ALogLevel logLevel

    The log level.

    String category

    The category.

    Log(ALogMessageCallback, ALogLevel, String, Exception)

    Logs a message at the specified log level.

    This method is thread-safe.

    Declaration
    public void Log(ALogMessageCallback messageFunc, ALogLevel logLevel, string category, Exception exception)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    ALogLevel logLevel

    The log level.

    String category

    The category.

    Exception exception

    The exception.

    Trace(ALogMessageCallback, String)

    Logs a Trace message.

    This method is thread-safe.

    Declaration
    public void Trace(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Trace(String)

    Logs a Trace message.

    This method is thread-safe.

    Declaration
    public void Trace(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Trace(String, Exception, String)

    Logs a Trace message.

    This method is thread-safe.

    Declaration
    public void Trace(string category, Exception exception, string message)
    Parameters
    Type Name Description
    String category

    The category.

    Exception exception

    The exception.

    String message

    The message.

    Trace(String, String)

    Logs a Trace message.

    This method is thread-safe.

    Declaration
    public void Trace(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    Warn(ALogMessageCallback, String)

    Logs a Warn message.

    This method is thread-safe.

    Declaration
    public void Warn(ALogMessageCallback messageFunc, string category)
    Parameters
    Type Name Description
    ALogMessageCallback messageFunc

    The message function returning a string. It can be null, as can the returned string, in which case no custom message will be added to the logged event.

    String category

    The category.

    Warn(String)

    Logs a Warn message.

    This method is thread-safe.

    Declaration
    public void Warn(string category)
    Parameters
    Type Name Description
    String category

    The category.

    Warn(String, String)

    Logs a Warn message.

    This method is thread-safe.

    Declaration
    public void Warn(string category, string message)
    Parameters
    Type Name Description
    String category

    The category.

    String message

    The message.

    In This Article
    Back to top Copyright © 2023 Envobi Ltd