SCIGetErrorLog

Syntax

#include <cafe/sci.h>

#define SCI_MAX_ERRORLOG_IDX     100
#define SCI_LAST_ERRORLOG_IDX    0
#define SCI_MAX_ERRORLOG_SIZE    (32*1024)

u32 SCIGetErrorLog(char* buffer, u32 buffer_length, u32 log_index);

Parameters

buffer Pointer to a buffer where the error log will be written.
buffer_length Length in bytes of buffer. The maximum buffer size is SCI_MAX_ERRORLOG_SIZE.
log_index Index of the desired system crash log. The index ranges from SCI_LAST_ERRORLOG_IDX to OS_MAX_CRASHLOG_IDX. SCI_LAST_ERRORLOG_IDX refers to the most recent crash log.

Return Values

On success the function returns a value > 0. The returned value represents the number of bytes found in the crash log.

Description

Retrieves the system error log requested by log_index.

IMPORTANT:
This error log functionality can be enabled by configuring your application with the Application Configuration Tool (ver.1.7.x or later). The functionality is for development use only. When building a master submission ROM, disable this option before exporting a configuration file.

Demo

A demo of this functionality exists at:

$CAFE_ROOT/system/src/demo/sci/sci_get_error_log.cpp

This demo retrieves and displays all error logs and the total number of error logs found.

Do Not Call From

None.

See Also

OSLogArgs
OSLogFunc
OSLogPrintf
OSLogReport
OSLogRetrieve
OSLogSaveCrashDump
OSLogSetFilterPolicy

Revision History

2014-10-22 Initial version.


CONFIDENTIAL