module xdc.runtime.Log |
Event logging manager
C synopsis | target-domain | sourced in xdc/runtime/Log.xdc |
Functions | |
Void | |
macro Void | |
macro Void | |
macro Void | |
macro Void | |
macro Void | Log_error4// Generate a Log "error event" with 4 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_error5// Generate a Log "error event" with 5 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5); |
macro Log_EventId | |
macro Diags_Mask | |
macro Void | |
macro Void | |
macro Void | |
macro Void | |
macro Void | Log_info4// Generate a Log "info event" with 4 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_info5// Generate a Log "info event" with 5 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5); |
macro Void | |
macro Void | |
macro Void | Log_print2// Generate a Log "print event" with 2 arguments(Diags_Mask mask, CString fmt, IArg a1, IArg a2); |
macro Void | Log_print3// Generate a Log "print event" with 3 arguments(Diags_Mask mask, CString fmt, IArg a1, IArg a2, IArg a3); |
macro Void | Log_print4// Generate a Log "print event" with 4 arguments(Diags_Mask mask, CString fmt, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_print5// Generate a Log "print event" with 5 arguments(Diags_Mask mask, CString fmt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5); |
macro Void | Log_print6// Generate a Log "print event" with 6 arguments(Diags_Mask mask, CString fmt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6); |
macro Void | |
macro Void | |
macro Void | Log_put2// Unconditionally put the specified Log event and 2 arguments(Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2); |
macro Void | Log_put4// Unconditionally put the specified Log event and 4 arguments(Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_put8// Unconditionally put the specified Log event and 8 arguments(Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8); |
macro Void | |
macro Void | |
macro Void | |
macro Void | Log_warning3// Generate a Log "warning event" with 3 arguments(CString fmt, IArg a1, IArg a2, IArg a3); |
macro Void | Log_warning4// Generate a Log "warning event" with 4 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_warning5// Generate a Log "warning event" with 5 arguments(CString fmt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5); |
macro Void | |
macro Void | |
macro Void | |
macro Void | |
macro Void | Log_write4// Generate a Log event with 4 arguments(Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4); |
macro Void | Log_write5// Generate a Log event with 5 arguments(Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5); |
macro Void | Log_write6// Generate a Log event with 6 arguments(Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6); |
macro Void | Log_write7// Generate a Log event with 7 arguments(Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7); |
macro Void | Log_write8// Generate a Log event with 8 arguments(Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8); |
Functions common to all target modules | |
Log_Module_getMask// Returns the diagnostics mask for this module,
Log_Module_hasMask// Test whether this module has a diagnostics mask,
Log_Module_heap// The heap from which this module allocates memory,
Log_Module_id// Get this module's unique id,
Log_Module_setMask// Set the diagnostics mask for this module,
Log_Module_startupDone// Test if this module has completed startup
|
|
Defines | |
#define | |
#define | |
Typedefs | |
typedef opaque | |
typedef Types_RopeId | |
typedef struct | |
Constants | |
extern const Log_Event | |
extern const Log_Event | |
extern const Log_Event | |
extern const Log_Event | |
extern const Log_Event | |
extern const Log_Event | |
extern const Log_Event |
-Dxdc_runtime_Log_DISABLE_ALL -Dxdc_runtime_Log_ENABLE_ERROR
import xdc.runtime.Diags; import xdc.runtime.Log; config Log.Event L_someEvent = { mask: Diags.USER1 | Diags.USER2, level: Diags.LEVEL1, msg: "my log event message, arg1: 0x%x, arg2: 0x%x" };
#include <xdc/runtime/Log.h> UInt x, y; Log_write2(Mod_L_someEvent, (IArg)x, (IArg)y);
var Diags = xdc.useModule('xdc.runtime.Diags'); var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys'); var Mod = xdc.useModule('my.pkg.Mod'); Mod.common$.diags_USER1 = Diags.ALWAYS_ON; Mod.common$.logger = LoggerSys.create();
var Diags = xdc.useModule('xdc.runtime.Diags'); var Mod = xdc.useModule('my.pkg.Mod'); Mod.common$.diags_ENTER = Diags.ALWAYS_ON; Mod.common$.diags_EXIT = Diags.ALWAYS_ON;
var Diags = xdc.useModule('xdc.runtime.Diags'); var Mod = xdc.useModule('my.pkg.Mod'); Mod.common$.diags_ENTER = Diags.RUNTIME_OFF; Mod.common$.diags_EXIT = Diags.RUNTIME_OFF;
// turn on enter and exit logging in the module Diags_setMask("my.pkg.Mod+EX"); // turn off enter and exit logging in the module Diags_setMask("my.pkg.Mod-EX");
const Log_NUMARGS |
Maximum number of arguments supported in Log events
C synopsis | target-domain |
const Log_PRINTFID |
The EventId for Log_print() events
C synopsis | target-domain |
typedef Log_Event |
Log event type
C synopsis | target-domain |
typedef Log_EventId |
Unique ID embedded in each Event
C synopsis | target-domain |
struct Log_EventRec |
The target representation of a recorded event
C synopsis | target-domain |
config Log_L_construct // module-wide |
Lifecycle event posted when an instance is constructed
C synopsis | target-domain |
config Log_L_create // module-wide |
Lifecycle event posted when an instance is created
C synopsis | target-domain |
config Log_L_delete // module-wide |
Lifecycle event posted when an instance is deleted
C synopsis | target-domain |
config Log_L_destruct // module-wide |
Lifecycle event posted when an instance is destructed
C synopsis | target-domain |
config Log_L_error // module-wide |
Error event posted by Log_errorX API
C synopsis | target-domain |
config Log_L_info // module-wide |
Info event posted by Log_infoX API
C synopsis | target-domain |
config Log_L_warning // module-wide |
Warning event posted by Log_warningX API
C synopsis | target-domain |
Log_doPrint() // module-wide |
Render an event as text via System_printf
C synopsis | target-domain |
Log_error0() // module-wide |
Generate a Log "error event" with 0 arguments
C synopsis | target-domain |
Log_error1() // module-wide |
Generate a Log "error event" with 1 argument
C synopsis | target-domain |
Log_error2() // module-wide |
Generate a Log "error event" with 2 arguments
C synopsis | target-domain |
Log_error3() // module-wide |
Generate a Log "error event" with 3 arguments
C synopsis | target-domain |
Log_error4() // module-wide |
Generate a Log "error event" with 4 arguments
C synopsis | target-domain |
Log_error5() // module-wide |
Generate a Log "error event" with 5 arguments
C synopsis | target-domain |
Log_error0("Invalid argument");
ERROR at "MyCode.c", line 35: Invalid argument
Int myArg; Log_error1("Invalid argument: %d", myArg);
ERROR: "MyCode.c", line 35: Invalid argument: -1
Log_getEventId() // module-wide |
Get event ID of the specified (encoded) event
C synopsis | target-domain |
Log_getMask() // module-wide |
Get the Diags mask for the specified (encoded) event
C synopsis | target-domain |
Log_info0() // module-wide |
Generate a Log "info event" with 0 arguments
C synopsis | target-domain |
Log_info1() // module-wide |
Generate a Log "info event" with 1 argument
C synopsis | target-domain |
Log_info2() // module-wide |
Generate a Log "info event" with 2 arguments
C synopsis | target-domain |
Log_info3() // module-wide |
Generate a Log "info event" with 3 arguments
C synopsis | target-domain |
Log_info4() // module-wide |
Generate a Log "info event" with 4 arguments
C synopsis | target-domain |
Log_info5() // module-wide |
Generate a Log "info event" with 5 arguments
C synopsis | target-domain |
Int load; Log_info1("Current load: %d", load);
"MyCode.c", line 15: Current load: 25
Log_print0() // module-wide |
Generate a Log "print event" with 0 arguments
C synopsis | target-domain |
Log_print1() // module-wide |
Generate a Log "print event" with 1 argument
C synopsis | target-domain |
Log_print2() // module-wide |
Generate a Log "print event" with 2 arguments
C synopsis | target-domain |
Log_print3() // module-wide |
Generate a Log "print event" with 3 arguments
C synopsis | target-domain |
Log_print4() // module-wide |
Generate a Log "print event" with 4 arguments
C synopsis | target-domain |
Log_print5() // module-wide |
Generate a Log "print event" with 5 arguments
C synopsis | target-domain |
Log_print6() // module-wide |
Generate a Log "print event" with 6 arguments
C synopsis | target-domain |
Conversion Character Description ------------------------------------------------ %c Character %d Signed integer %u Unsigned integer %x Unsigned hexadecimal integer %o Unsigned octal integer %s Character string %p Pointer %f Single precision floating point (float)
String list[]; UInt i; Log_print2(Diags_USER2, "list[%u] = %s\n", i, (IArg)list[i]);
Log_print1(Diags_USER1, "float = %f", floatToArg(2.34567));
var System = xdc.useModule('xdc.runtime.System'); System.extendedFormats = "%f";
Log_put0() // module-wide |
Unconditionally put the specified Log event with 0 arguments
C synopsis | target-domain |
Log_put1() // module-wide |
Unconditionally put the specified Log event and 1 argument
C synopsis | target-domain |
Log_put2() // module-wide |
Unconditionally put the specified Log event and 2 arguments
C synopsis | target-domain |
Log_put4() // module-wide |
Unconditionally put the specified Log event and 4 arguments
C synopsis | target-domain |
Log_put8() // module-wide |
Unconditionally put the specified Log event and 8 arguments
C synopsis | target-domain |
Log_warning0() // module-wide |
Generate a Log "warning event" with 0 arguments
C synopsis | target-domain |
Log_warning1() // module-wide |
Generate a Log "warning event" with 1 argument
C synopsis | target-domain |
Log_warning2() // module-wide |
Generate a Log "warning event" with 2 arguments
C synopsis | target-domain |
Log_warning3() // module-wide |
Generate a Log "warning event" with 3 arguments
C synopsis | target-domain |
Log_warning4() // module-wide |
Generate a Log "warning event" with 4 arguments
C synopsis | target-domain |
Log_warning5() // module-wide |
Generate a Log "warning event" with 5 arguments
C synopsis | target-domain |
Int myArg; Log_warning1("Value may be too high: %d", myArg);
WARNING: "MyCode.c", line 50: Value may be too high: 4096
Log_write0() // module-wide |
Generate a Log event with 0 arguments
C synopsis | target-domain |
Log_write1() // module-wide |
Generate a Log event with 1 argument
C synopsis | target-domain |
Log_write2() // module-wide |
Generate a Log event with 2 arguments
C synopsis | target-domain |
Log_write3() // module-wide |
Generate a Log event with 3 arguments
C synopsis | target-domain |
Log_write4() // module-wide |
Generate a Log event with 4 arguments
C synopsis | target-domain |
Log_write5() // module-wide |
Generate a Log event with 5 arguments
C synopsis | target-domain |
Log_write6() // module-wide |
Generate a Log event with 6 arguments
C synopsis | target-domain |
Log_write7() // module-wide |
Generate a Log event with 7 arguments
C synopsis | target-domain |
Log_write8() // module-wide |
Generate a Log event with 8 arguments
C synopsis | target-domain |
Module-Wide Built-Ins |
C synopsis | target-domain |
Configuration settings | sourced in xdc/runtime/Log.xdc |
const Log.NUMARGS |
Maximum number of arguments supported in Log events
Configuration settings |
const Log.PRINTFID |
The EventId for Log_print() events
Configuration settings |
metaonly struct Log.EventDesc |
Log event descriptor
Configuration settings |
struct Log.EventRec |
The target representation of a recorded event
Configuration settings |
config Log.L_construct // module-wide |
Lifecycle event posted when an instance is constructed
Configuration settings |
config Log.L_create // module-wide |
Lifecycle event posted when an instance is created
Configuration settings |
config Log.L_delete // module-wide |
Lifecycle event posted when an instance is deleted
Configuration settings |
config Log.L_destruct // module-wide |
Lifecycle event posted when an instance is destructed
Configuration settings |
config Log.L_error // module-wide |
Error event posted by Log_errorX API
Configuration settings |
config Log.L_info // module-wide |
Info event posted by Log_infoX API
Configuration settings |
config Log.L_warning // module-wide |
Warning event posted by Log_warningX API
Configuration settings |
metaonly config Log.common$ // module-wide |
Common module configuration parameters
Configuration settings |