Search Results for

    Show / Hide Table of Contents

    Class Logger

    Provides functionality for developers to view debug logs and export log files from IronQR.

    Inheritance
    System.Object
    Logger
    Namespace: IronQr.Logging
    Assembly: IronQr.dll
    Syntax
    public static class Logger : Object

    Turning on IronQR's debug logging runs through the static Logger. When a read returns nothing or a write behaves unexpectedly, the log shows what the detector and native layer actually did, which is far faster than guessing. The members are static, so configure logging once at startup.

    LoggingMode selects where output goes through a LoggingModes flags value, combining destinations such as console, the IDE debug window, a file, or a custom handler. LogFilePath sets the file target when File is among the modes. ClearLogFiles() deletes existing log files, useful at the start of a run so the output reflects only the current session. Leave logging off in production and enable it while diagnosing a specific issue. Because the modes are flags, a single run can log to both the console and a file at once, giving live feedback while preserving a record to attach to a bug report.

    using IronQr;
    using IronQr.Logging;
    
    Logger.LoggingMode = LoggingModes.Console;

    The detailed error messages how-to turns logging on for diagnostics, and the get started guide covers project setup.

    Properties

    LogFilePath

    Setting a log path produces ‘log files’ which may be vey useful for debugging in production or providing to Iron Software support when reporting an issue.

    LogFilePath may be set to a directory name or a full file name.

    Setting LogFilePath = null will turn off log files.

    Declaration
    public static string LogFilePath { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    ClearLogFiles()

    LoggingMode

    Activate or disable detailed developer messages sent to your choice of location in the IDE or application console.

    Declaration
    public static Logger.LoggingModes LoggingMode { get; set; }
    Property Value
    Type Description
    Logger.LoggingModes

    Methods

    ClearLogFiles()

    Removes any Iron Software log files at the LogFilePath.

    Declaration
    public static void ClearLogFiles()
    See Also
    LogFilePath
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with NuGet