Introduction to logging using C++ API - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English

This library provides a flexible logging system. Below are the main classes:

  1. Au::Logger::LogWriter

    • Runs a dedicated thread for log processing.

    • Spools and commits messages to the chosen output.

    • Implemented as a singleton, use Au::Logger::LogWriter::getLogWriter().

  2. Au::Logger::LogManager

    • Manages log messages at a higher level.

    • Collects messages and forwards them to Au::Logger::LogWriter.

    • Your primary interface for logging in the application.

  3. Au::Logger::LoggerFactory

    • Creates and configures loggers.

    • Offers ways to switch between different logger types such as console or file outputs.

  4. Au::Logger::Message

    • Represents a single log entry with a Timestamp and a Priority.

    • Construct with a string payload and (optionally) a Priority.

  5. Au::Logger::ConsoleLogger

    • Outputs log messages to the console.

    • Default choice for quick debugging.

  6. Au::Logger::FileLogger

    • Writes log messages to a file.

    • Requires a filename during construction.