Share via


Logging Library (Windows CE 5.0)

Send Feedback

The logging library provides a single function and zone definitions to trace OAL components in a consistent way. This library provides an interface for consistent tracing of OAL components. For more information, see %_WINCEROOT%\Platform\Common\Src\Inc\Oal_log.h.

You should instrument all function entries and exits with the OAL_FUNC zone using the OALMSG macro, which calls down to the printing routines.

  • Function entry tracing:

    +FuncName( Arg1, Arg2, ... )
    
  • Function exit tracing:

    -FuncName(rc=x)
    

    In the function for exit tracing, rc indicates the return code, if present.

By turning on the OAL_FUNC zone trace mask, you should be able to follow the OAL program flow. Use the following guidelines when tracking OAL components:

  • Instrument any error conditions with the OAL_ERROR zones.

    The error string should begin with "ERROR: ".

  • Instrument any warning conditions with the OAL_WARN zones.

    The warning string should begin with "WARNING:".

  • Instrument any informational tracing with the OAL_INFO zone.

    The informational string should begin with "INFO:".

The logging library relies on a global OAL trace mask and uses the underlying output methods provided by the kernel. Trace initially uses serial output, and then switches to KITL if it is enabled.

See Also

Production-Quality OAL Components | Logging Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.