#include <cafe/os/OSSystemLog.h>

BOOL OSLogRetrieve(u32 retrievalOptions, OS_LOG_RETRIEVAL* pRetrieval,
		   u32 maxRetrievedSize);


retrievalOptions Bitmap of options that may help reduce the amount of retrieved events. Multiple options may be expressed by bitwise OR-ing them together. For a list of available options, see the table OS Log Retrieval Options.
pRetrieval Pointer to header of type OS_LOG_RETRIEVAL, beyond which any number of log entries may be written.
maxRetrievedSize Size of available memory referred to by pRetrieval.

Return Values

FALSE indicates the function failed. TRUE indicates the function succeeded.


Retrieves the contents of the event log. The user controls how much of the event log will be retrieved by providing more or less memory referred to by pRetrieval and maxRetrievedSize. Since logged events are variable in size, when the user is parsing the output of this function, it is necessary to traverse using the size field of OS_LOG_ENTRY_HEADER.

Specification of the retrievalOptions argument may exclude some events which currently exist in the log. Events that currently exist in the log but are excluded because of subsequent policy established by OSLogSetFilterPolicy are not retrieved unless the OS_LOG_RETRIEVAL_OPT_IGNORE_FILTERS_MASK option is specified.

This function is disabled in Production mode. To use this function, change the CAT-DEV or CAT-R to Development mode using the System Config Tool.

Do Not Call From

Multiple threads This function is not thread-safe.
Production code Do not call this function in production code. It is available only for debugging purposes.

See Also

System Logging Overview
APP_TRACE_* Macros

Revision History

2014/08/19 Add Production-only notice.
2013/05/08 Automated cleanup pass.
2012/05/23 Initial version.