Search Results for

    Show / Hide Table of Contents

    Interface IALogFactory

    The interface for an actionETL logging factory. This, and IALogService, must be implemented to inject a custom logging framework into a worker system. It allows flushing log messages, and acquiring new loggers.

    Namespace: actionETL.Logging
    Assembly: actionETL.dll
    Syntax
    public interface IALogFactory

    Methods

    Flush()

    Flushes any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.

    This method must be thread-safe.

    Declaration
    void Flush()

    Flush(Int32)

    Flushes any pending log messages (in case of asynchronous targets).

    This method must be thread-safe.

    Declaration
    void Flush(int timeoutMilliseconds)
    Parameters
    Type Name Description
    Int32 timeoutMilliseconds

    Maximum time to allow for the flush. Any messages after that time will be discarded.

    GetLogger(String)

    Gets a logger.

    This method must be thread-safe.

    Loggers are cached (if there is sufficient memory available) and in general only one logger per loggerName and NLogFactory exists.

    When creating hundreds of thousands of workers iteratively, do reuse the same names (and Locator strings) for successive workers if possible, to allow reusing loggers and reduce the overhead of creating new loggers.

    Declaration
    ALog GetLogger(string loggerName)
    Parameters
    Type Name Description
    String loggerName

    Name of the logger.

    Returns
    Type Description
    ALog

    A logger with the specified logger name.

    GetLogger(Type)

    Gets the logger.

    This method must be thread-safe.

    Loggers are cached (if there is sufficient memory available) and in general only one logger per loggerName and NLogFactory exists.

    When creating hundreds of thousands of workers iteratively, do reuse the same names (and Locator strings) for successive workers if possible, to allow reusing loggers and reduce the overhead of creating new loggers.

    Declaration
    ALog GetLogger(Type type)
    Parameters
    Type Name Description
    Type type

    The type whose name becomes the logger name.

    Returns
    Type Description
    ALog

    A logger with the logger name taken from the type name.

    In This Article
    Back to top Copyright © 2023 Envobi Ltd