theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
MkObjectC_Log_C_API

MkObjectC - log information to MkLogFileC (default: stderr) … More...

+ Collaboration diagram for MkObjectC_Log_C_API:

Macros

#define MkDDInit   const MK_I32 __dbg = MK_RT_REF.debug
 
#define MkDDInitNum(n)
 
#define MkDProtect(_debug)
 
#define MkDProtect2(_debug, _call)
 
#define MkLogC_4X(x, message, debug, callfunc)
 
#define MkLogC_3X(x, message, debug)
 
#define MkLogC_2X(x, message)
 
#define MkLogW(x, callfunc, _debug, message)
 
#define MkDbgV_2X(x, printfmt, ...)
 
#define MkDbgV_2O(o, printfmt, ...)
 
#define MkLogV_lvl(x, debug, printfmt, ...)
 
#define MkLogV_4M(x, callfunc, debug, printfmt, ...)
 
#define MkLogV_4X(x, callfunc, debug, printfmt, ...)
 
#define MkLogV_3X(x, callfunc, printfmt, ...)
 
#define MkLogV_2X(x, printfmt, ...)
 
#define MkLogVL_5X(fmtobj, callfunc, debug, printfmt, var_list)
 
#define MkLogHEX_4X(fmtobj, callfunc, data, len)
 
#define MkObjectLogShort_1X(x)
 
#define MkObjectLogShort_2Lvl(o, l)
 
#define MkObjectLogLong_1X(x)
 
#define MkObjectLogLong_1X(x)
 
#define MkObjectLogLong_1M(m)
 
#define MkObjectLogLong_1M(m)
 
#define MkObjectLog_1X(x)
 
#define MkObjectLog_2Lvl(o, l)
 

Functions

void MkLogC_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc)
 write a logging-message to MkLogFileC (default: stderr) using the internal format …
 
void MkDbgV_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, FILE *FH, MK_FST const printfmt,...)
 write a printf style debug-message to FH using the internal format …
 
void MkLogV_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt,...)
 write a printf style logging-message to MkLogFileC (default: stderr) using the internal format …
 
void MkLogVL_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt, va_list var_list)
 write a vprintf style logging-message to MkLogFileC using the internal format …
 
void MkLogHEX_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MkBinaryR const data)
 log binaray data as HEX into the MkLogFileC (default: stderr) …
 
void MkObjectLogShort_RT (MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
 log the MkObjectS into the MkLogFileC (default: stderr) …
 
void MkObjectLogLong_RT (MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
 log the MkObjectS verbose into the MkLogFileC (default: stderr) …
 
void MkObjectLogType_RT (MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
 log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …
 
void MkObjectLog_RT (MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
 Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …
 

evaluate CODE in debug …

_debug

#define MkDCheck(_debug)
 
#define MkDDCheck(_debug)
 

log a plain string …

Parameters
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format) _debug
strthe message to log
#define MkDLogC_O(fmtobj, _debug, str)
 
#define MkDLogC(x, _debug, str)
 
#define MkDDLogC(x, _debug, str)
 

log a vararg string using formatting and checking for logging debug …

Parameters
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format) _debug
[in]printfmtis a c-string used as printf like format string
...vararg string argument
#define MkDLogV_O(fmtobj, _debug, printfmt, ...)
 
#define MkDLogV(x, _debug, printfmt, ...)
 
#define MkDDLogV(fmtobj, _debug, printfmt, ...)
 

MkObjectC - MkObjectC_Log_C_API - overload

#define MkLogC_NULL(...)
 
#define MkLogC(...)
 
#define MkLogC_3(fmtobj, message, debug)
 
#define MkLogC_2(fmtobj, message)
 
#define MkLogC_1(message)
 
#define MkLogHEX_NULL(...)
 
#define MkLogHEX(...)
 
#define MkLogHEX_2(fmtobj, data)
 
#define MkLogHEX_1(data)
 
#define MkLogV_NULL(...)
 
#define MkLogV(...)
 
#define MkLogV_3(fmtobj, callfunc, printfmt, ...)
 
#define MkLogV_2(fmtobj, printfmt, ...)
 
#define MkLogV_1(printfmt, ...)
 
#define MkLogVL_NULL(...)
 
#define MkLogVL(...)
 
#define MkLogVL_4(fmtobj, callfunc, printfmt, var_list)
 
#define MkLogVL_3(fmtobj, printfmt, var_list)
 
#define MkLogVL_2(printfmt, var_list)
 
#define MkObjectLog_NULL(...)
 
#define MkObjectLog(...)
 
#define MkObjectLog_4(obj, fmtobj, debug, callfunc)
 
#define MkObjectLog_3(obj, fmtobj, debug)
 
#define MkObjectLog_2(obj, fmtobj)
 
#define MkObjectLog_1(obj)
 
#define MkObjectLogLong_NULL(...)
 
#define MkObjectLogLong(...)
 
#define MkObjectLogLong_4(obj, fmtobj, debug, callfunc)
 
#define MkObjectLogLong_3(obj, fmtobj, debug)
 
#define MkObjectLogLong_2(obj, fmtobj)
 
#define MkObjectLogLong_1(obj)
 
#define MkObjectLogShort_NULL(...)
 
#define MkObjectLogShort(...)
 
#define MkObjectLogShort_4(obj, fmtobj, debug, callfunc)
 
#define MkObjectLogShort_3(obj, fmtobj, debug)
 
#define MkObjectLogShort_2(obj, fmtobj)
 
#define MkObjectLogShort_1(obj)
 
#define MkObjectLogType_NULL(...)
 
#define MkObjectLogType(...)
 
#define MkObjectLogType_4(obj, fmtobj, debug, callfunc)
 
#define MkObjectLogType_3(obj, fmtobj, debug)
 
#define MkObjectLogType_2(obj, fmtobj)
 
#define MkObjectLogType_1(obj)
 

Detailed Description

MkObjectC - log information to MkLogFileC (default: stderr) …

The logging-target is set direct by RuntimeLogTargetSet or using the class MkLogFileC.

The target is stored at the MkRuntimeC using a FILE-stream and can be set individually for each thread. The default is stderr.

possible values are:

value decription OS man-page
stdout the standart output stdio(3)
stderr the standart error output stdio(3)
fileName an arbitary fileName fopen(3)

Many logging functions have common parameters:

Parameters
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)

Macro Definition Documentation

◆ MkDbgV_2O

#define MkDbgV_2O ( o,
printfmt,
... )
Value:
MkDbgV_RT(MK_RT_CALL o ,__func__,stderr,printfmt,__VA_ARGS__)
void MkDbgV_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, FILE *FH, MK_FST const printfmt,...)
write a printf style debug-message to FH using the internal format …
#define MK_RT_CALL

Definition at line 5405 of file LibMkKernel_mk.h.

◆ MkDbgV_2X

#define MkDbgV_2X ( x,
printfmt,
... )
Value:
MkDbgV_RT(MK_RT_CALL MkOBJ(x),__func__,stderr,printfmt,__VA_ARGS__)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

Definition at line 5404 of file LibMkKernel_mk.h.

◆ MkDCheck

#define MkDCheck ( _debug)
Value:
if (unlikely(MK_RT_REF.debug >= _debug))
#define unlikely(x)
#define MK_RT_REF

Definition at line 358 of file LibMkKernel_mk.h.

◆ MkDDCheck

#define MkDDCheck ( _debug)
Value:
if (unlikely(__dbg >= _debug))

Definition at line 359 of file LibMkKernel_mk.h.

◆ MkDDInit

#define MkDDInit   const MK_I32 __dbg = MK_RT_REF.debug

Definition at line 352 of file LibMkKernel_mk.h.

◆ MkDDInitNum

#define MkDDInitNum ( n)
Value:
const MK_I32 __dbg = n
signed int MK_I32
4 byte integer data-type

Definition at line 353 of file LibMkKernel_mk.h.

◆ MkDDLogC

#define MkDDLogC ( x,
_debug,
str )
Value:
if (unlikely(__dbg >= _debug)) MkLogC_4X(x,str,_debug,__func__)
#define MkLogC_4X(x, message, debug, callfunc)

Definition at line 372 of file LibMkKernel_mk.h.

372# define MkDDLogC(x,_debug,str) \
373 if (unlikely(__dbg >= _debug)) MkLogC_4X(x,str,_debug,__func__)

◆ MkDDLogV

#define MkDDLogV ( fmtobj,
_debug,
printfmt,
... )
Value:
if (unlikely(__dbg >= _debug)) MkLogV_4M(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
#define MkLogV_4M(x, callfunc, debug, printfmt,...)

Definition at line 387 of file LibMkKernel_mk.h.

387# define MkDDLogV(fmtobj,_debug,printfmt,...) \
388 if (unlikely(__dbg >= _debug)) MkLogV_4M(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)

◆ MkDLogC

#define MkDLogC ( x,
_debug,
str )
Value:
MkDLogC_O(MkOBJ(x),_debug,str)
#define MkDLogC_O(fmtobj, _debug, str)

Definition at line 370 of file LibMkKernel_mk.h.

◆ MkDLogC_O

#define MkDLogC_O ( fmtobj,
_debug,
str )
Value:
if (unlikely(MK_RT_REF.debug >= _debug)) MkLogC(fmtobj,str,_debug,__func__)
#define MkLogC(...)

Definition at line 367 of file LibMkKernel_mk.h.

367# define MkDLogC_O(fmtobj,_debug,str) \
368 if (unlikely(MK_RT_REF.debug >= _debug)) MkLogC(fmtobj,str,_debug,__func__)

◆ MkDLogV

#define MkDLogV ( x,
_debug,
printfmt,
... )
Value:
MkDLogV_O(MkOBJ(x),_debug,printfmt,__VA_ARGS__)
#define MkDLogV_O(fmtobj, _debug, printfmt,...)

Definition at line 385 of file LibMkKernel_mk.h.

◆ MkDLogV_O

#define MkDLogV_O ( fmtobj,
_debug,
printfmt,
... )
Value:
if (unlikely(MK_RT_REF.debug >= _debug)) MkLogV(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
#define MkLogV(...)

Definition at line 382 of file LibMkKernel_mk.h.

382# define MkDLogV_O(fmtobj,_debug,printfmt,...) \
383 if (unlikely(MK_RT_REF.debug >= _debug)) MkLogV(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)

◆ MkDProtect

#define MkDProtect ( _debug)
Value:
if (MK_RT_REF.debug < _debug) { \
MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' with '%d'" MK_COLOR_RESET "\n", __func__, debug); \
printSTACK_1(fmtobj); \
return; \
}

Definition at line 391 of file LibMkKernel_mk.h.

391 # define MkDProtect(_debug) if (MK_RT_REF.debug < _debug) { \
392 MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' with '%d'" MK_COLOR_RESET "\n", __func__, debug); \
393 printSTACK_1(fmtobj); \
394 return; \
395 }

◆ MkDProtect2

#define MkDProtect2 ( _debug,
_call )
Value:
if (MK_RT_REF.debug < _debug) { \
MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' from '%s' with '%d'" \
MK_COLOR_RESET "\n", __func__, _call, debug); \
printSTACK_1(fmtobj); \
return; \
}

Definition at line 396 of file LibMkKernel_mk.h.

396 # define MkDProtect2(_debug,_call) if (MK_RT_REF.debug < _debug) { \
397 MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' from '%s' with '%d'" \
398 MK_COLOR_RESET "\n", __func__, _call, debug); \
399 printSTACK_1(fmtobj); \
400 return; \
401 }

◆ MkLogC

#define MkLogC ( ...)
Value:
MkLogC_RT(MK_RT_CALL __VA_ARGS__)
void MkLogC_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc)
write a logging-message to MkLogFileC (default: stderr) using the internal format …

Definition at line 1595 of file kernel_overload_mk.h.

◆ MkLogC_1

#define MkLogC_1 ( message)
Value:
MkLogC(NULL,message,0,__func__)

Definition at line 1598 of file kernel_overload_mk.h.

◆ MkLogC_2

#define MkLogC_2 ( fmtobj,
message )
Value:
MkLogC(fmtobj,message,0,__func__)

Definition at line 1597 of file kernel_overload_mk.h.

◆ MkLogC_2X

#define MkLogC_2X ( x,
message )
Value:
MkLogC_2(MkOBJ(x),message)
#define MkLogC_2(fmtobj, message)

Definition at line 5382 of file LibMkKernel_mk.h.

◆ MkLogC_3

#define MkLogC_3 ( fmtobj,
message,
debug )
Value:
MkLogC(fmtobj,message,debug,__func__)

Definition at line 1596 of file kernel_overload_mk.h.

◆ MkLogC_3X

#define MkLogC_3X ( x,
message,
debug )
Value:
MkLogC_3(MkOBJ(x),message,debug)
#define MkLogC_3(fmtobj, message, debug)

Definition at line 5381 of file LibMkKernel_mk.h.

◆ MkLogC_4X

#define MkLogC_4X ( x,
message,
debug,
callfunc )
Value:
MkLogC(MkOBJ(x),message,debug,callfunc)

Definition at line 5380 of file LibMkKernel_mk.h.

◆ MkLogC_NULL

#define MkLogC_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 1594 of file kernel_overload_mk.h.

◆ MkLogHEX

#define MkLogHEX ( ...)
Value:
MkLogHEX_RT(MK_RT_CALL __VA_ARGS__)
void MkLogHEX_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MkBinaryR const data)
log binaray data as HEX into the MkLogFileC (default: stderr) …

Definition at line 1600 of file kernel_overload_mk.h.

◆ MkLogHEX_1

#define MkLogHEX_1 ( data)
Value:
MkLogHEX(NULL,__func__,data)
#define MkLogHEX(...)

Definition at line 1602 of file kernel_overload_mk.h.

◆ MkLogHEX_2

#define MkLogHEX_2 ( fmtobj,
data )
Value:
MkLogHEX(fmtobj,__func__,data)

Definition at line 1601 of file kernel_overload_mk.h.

◆ MkLogHEX_4X

#define MkLogHEX_4X ( fmtobj,
callfunc,
data,
len )
Value:
MkLogHEX_RT(MkOBJ(fmtobj),callfunc,data,len)

Definition at line 5467 of file LibMkKernel_mk.h.

◆ MkLogHEX_NULL

#define MkLogHEX_NULL ( ...)
Value:

Definition at line 1599 of file kernel_overload_mk.h.

◆ MkLogV

#define MkLogV ( ...)
Value:
MkLogV_RT(MK_RT_CALL __VA_ARGS__)
void MkLogV_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt,...)
write a printf style logging-message to MkLogFileC (default: stderr) using the internal format …

Definition at line 1604 of file kernel_overload_mk.h.

◆ MkLogV_1

#define MkLogV_1 ( printfmt,
... )
Value:
MkLogV(NULL,__func__,0,printfmt,__VA_ARGS__)

Definition at line 1607 of file kernel_overload_mk.h.

◆ MkLogV_2

#define MkLogV_2 ( fmtobj,
printfmt,
... )
Value:
MkLogV(fmtobj,__func__,0,printfmt,__VA_ARGS__)

Definition at line 1606 of file kernel_overload_mk.h.

◆ MkLogV_2X

#define MkLogV_2X ( x,
printfmt,
... )
Value:
MkLogV_2(MkOBJ(x),printfmt,__VA_ARGS__)
#define MkLogV_2(fmtobj, printfmt,...)

Definition at line 5430 of file LibMkKernel_mk.h.

◆ MkLogV_3

#define MkLogV_3 ( fmtobj,
callfunc,
printfmt,
... )
Value:
MkLogV(fmtobj,callfunc,0,printfmt,__VA_ARGS__)

Definition at line 1605 of file kernel_overload_mk.h.

◆ MkLogV_3X

#define MkLogV_3X ( x,
callfunc,
printfmt,
... )
Value:
MkLogV_3(MkOBJ(x),callfunc,printfmt,__VA_ARGS__)
#define MkLogV_3(fmtobj, callfunc, printfmt,...)

Definition at line 5429 of file LibMkKernel_mk.h.

◆ MkLogV_4M

#define MkLogV_4M ( x,
callfunc,
debug,
printfmt,
... )
Value:
MkLogV(MkObjN(x),callfunc,debug,printfmt,__VA_ARGS__)
static MK_OBJN MkObjN(MK_MNGN mng)
(const) cast a unknown-object into an MkObjectS pointer or NULL if not possible

Definition at line 5427 of file LibMkKernel_mk.h.

◆ MkLogV_4X

#define MkLogV_4X ( x,
callfunc,
debug,
printfmt,
... )
Value:
MkLogV(MkOBJ(x),callfunc,debug,printfmt,__VA_ARGS__)

Definition at line 5428 of file LibMkKernel_mk.h.

◆ MkLogV_lvl

#define MkLogV_lvl ( x,
debug,
printfmt,
... )
Value:
MkLogV(MkOBJ(x),__func__,debug,printfmt,__VA_ARGS__)

Definition at line 5425 of file LibMkKernel_mk.h.

◆ MkLogV_NULL

#define MkLogV_NULL ( ...)
Value:

Definition at line 1603 of file kernel_overload_mk.h.

◆ MkLogVL

#define MkLogVL ( ...)
Value:
MkLogVL_RT(MK_RT_CALL __VA_ARGS__)
void MkLogVL_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt, va_list var_list)
write a vprintf style logging-message to MkLogFileC using the internal format …

Definition at line 1609 of file kernel_overload_mk.h.

◆ MkLogVL_2

#define MkLogVL_2 ( printfmt,
var_list )
Value:
MkLogVL(NULL,__func__,0,printfmt,var_list)
#define MkLogVL(...)

Definition at line 1612 of file kernel_overload_mk.h.

◆ MkLogVL_3

#define MkLogVL_3 ( fmtobj,
printfmt,
var_list )
Value:
MkLogVL(fmtobj,__func__,0,printfmt,var_list)

Definition at line 1611 of file kernel_overload_mk.h.

◆ MkLogVL_4

#define MkLogVL_4 ( fmtobj,
callfunc,
printfmt,
var_list )
Value:
MkLogVL(fmtobj,callfunc,0,printfmt,var_list)

Definition at line 1610 of file kernel_overload_mk.h.

◆ MkLogVL_5X

#define MkLogVL_5X ( fmtobj,
callfunc,
debug,
printfmt,
var_list )
Value:
MkLogVL(MkOBJ(fmtobj),callfunc,debug,printfmt,var_list)

Definition at line 5451 of file LibMkKernel_mk.h.

5451#define MkLogVL_5X(fmtobj,callfunc,debug,printfmt,var_list) \
5452 MkLogVL(MkOBJ(fmtobj),callfunc,debug,printfmt,var_list)

◆ MkLogVL_NULL

#define MkLogVL_NULL ( ...)
Value:

Definition at line 1608 of file kernel_overload_mk.h.

◆ MkLogW

#define MkLogW ( x,
callfunc,
_debug,
message )
Value:
MkLogC(MkOBJ(x),message,_debug,callfunc)

Definition at line 5383 of file LibMkKernel_mk.h.

◆ MkObjectLog

#define MkObjectLog ( ...)
Value:
void MkObjectLog_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …

Definition at line 1614 of file kernel_overload_mk.h.

◆ MkObjectLog_1

#define MkObjectLog_1 ( obj)
Value:
MkObjectLog(obj,NULL,0,__func__,0)
#define MkObjectLog(...)

Definition at line 1618 of file kernel_overload_mk.h.

◆ MkObjectLog_1X

#define MkObjectLog_1X ( x)
Value:
MkObjectLog(MkOBJ(x),NULL,0,__func__,0)

Definition at line 5623 of file LibMkKernel_mk.h.

◆ MkObjectLog_2

#define MkObjectLog_2 ( obj,
fmtobj )
Value:
MkObjectLog(obj,fmtobj,0,__func__,0)

Definition at line 1617 of file kernel_overload_mk.h.

◆ MkObjectLog_2Lvl

#define MkObjectLog_2Lvl ( o,
l )
Value:
MkObjectLog(o,NULL,0,__func__,l)

Definition at line 5624 of file LibMkKernel_mk.h.

◆ MkObjectLog_3

#define MkObjectLog_3 ( obj,
fmtobj,
debug )
Value:
MkObjectLog(obj,fmtobj,debug,__func__,0)

Definition at line 1616 of file kernel_overload_mk.h.

◆ MkObjectLog_4

#define MkObjectLog_4 ( obj,
fmtobj,
debug,
callfunc )
Value:
MkObjectLog(obj,fmtobj,debug,callfunc,0)

Definition at line 1615 of file kernel_overload_mk.h.

◆ MkObjectLog_NULL

#define MkObjectLog_NULL ( ...)
Value:

Definition at line 1613 of file kernel_overload_mk.h.

◆ MkObjectLogLong

#define MkObjectLogLong ( ...)
Value:
void MkObjectLogLong_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkObjectS verbose into the MkLogFileC (default: stderr) …

Definition at line 1620 of file kernel_overload_mk.h.

◆ MkObjectLogLong_1

#define MkObjectLogLong_1 ( obj)
Value:
MkObjectLogLong(obj,NULL,0,__func__,0)
#define MkObjectLogLong(...)

Definition at line 1624 of file kernel_overload_mk.h.

◆ MkObjectLogLong_1M [1/2]

#define MkObjectLogLong_1M ( m)
Value:
MkObjectLogLong(MkObj(m),NULL,0,__func__,0)
static MK_OBJ MkObj(MK_MNG mng)
cast a unknown-object into an MkObjectS pointer or NULL if not possible

Definition at line 5513 of file LibMkKernel_mk.h.

◆ MkObjectLogLong_1M [2/2]

#define MkObjectLogLong_1M ( m)
Value:
MkObjectLogLong(MkObj(m),NULL,0,__func__,0)

Definition at line 5513 of file LibMkKernel_mk.h.

◆ MkObjectLogLong_1X [1/2]

#define MkObjectLogLong_1X ( x)
Value:
MkObjectLogLong(MkOBJ(x),NULL,0,__func__,0)

Definition at line 5512 of file LibMkKernel_mk.h.

◆ MkObjectLogLong_1X [2/2]

#define MkObjectLogLong_1X ( x)
Value:
MkObjectLogLong(MkOBJ(x),NULL,0,__func__,0)

Definition at line 5512 of file LibMkKernel_mk.h.

◆ MkObjectLogLong_2

#define MkObjectLogLong_2 ( obj,
fmtobj )
Value:
MkObjectLogLong(obj,fmtobj,0,__func__,0)

Definition at line 1623 of file kernel_overload_mk.h.

◆ MkObjectLogLong_3

#define MkObjectLogLong_3 ( obj,
fmtobj,
debug )
Value:
MkObjectLogLong(obj,fmtobj,debug,__func__,0)

Definition at line 1622 of file kernel_overload_mk.h.

◆ MkObjectLogLong_4

#define MkObjectLogLong_4 ( obj,
fmtobj,
debug,
callfunc )
Value:
MkObjectLogLong(obj,fmtobj,debug,callfunc,0)

Definition at line 1621 of file kernel_overload_mk.h.

◆ MkObjectLogLong_NULL

#define MkObjectLogLong_NULL ( ...)
Value:

Definition at line 1619 of file kernel_overload_mk.h.

◆ MkObjectLogShort

#define MkObjectLogShort ( ...)
Value:
void MkObjectLogShort_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkObjectS into the MkLogFileC (default: stderr) …

Definition at line 1626 of file kernel_overload_mk.h.

◆ MkObjectLogShort_1

#define MkObjectLogShort_1 ( obj)
Value:
MkObjectLogShort(obj,NULL,0,__func__,0)
#define MkObjectLogShort(...)

Definition at line 1630 of file kernel_overload_mk.h.

◆ MkObjectLogShort_1X

#define MkObjectLogShort_1X ( x)
Value:
MkObjectLogShort(MkOBJ(x),NULL,0,__func__,0)

Definition at line 5489 of file LibMkKernel_mk.h.

◆ MkObjectLogShort_2

#define MkObjectLogShort_2 ( obj,
fmtobj )
Value:
MkObjectLogShort(obj,fmtobj,0,__func__,0)

Definition at line 1629 of file kernel_overload_mk.h.

◆ MkObjectLogShort_2Lvl

#define MkObjectLogShort_2Lvl ( o,
l )
Value:
MkObjectLogShort(o,NULL,0,__func__,l)

Definition at line 5490 of file LibMkKernel_mk.h.

◆ MkObjectLogShort_3

#define MkObjectLogShort_3 ( obj,
fmtobj,
debug )
Value:
MkObjectLogShort(obj,fmtobj,debug,__func__,0)

Definition at line 1628 of file kernel_overload_mk.h.

◆ MkObjectLogShort_4

#define MkObjectLogShort_4 ( obj,
fmtobj,
debug,
callfunc )
Value:
MkObjectLogShort(obj,fmtobj,debug,callfunc,0)

Definition at line 1627 of file kernel_overload_mk.h.

◆ MkObjectLogShort_NULL

#define MkObjectLogShort_NULL ( ...)
Value:

Definition at line 1625 of file kernel_overload_mk.h.

◆ MkObjectLogType

#define MkObjectLogType ( ...)
Value:
void MkObjectLogType_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …

Definition at line 1632 of file kernel_overload_mk.h.

◆ MkObjectLogType_1

#define MkObjectLogType_1 ( obj)
Value:
MkObjectLogType(obj,NULL,0,__func__,0)
#define MkObjectLogType(...)

Definition at line 1636 of file kernel_overload_mk.h.

◆ MkObjectLogType_2

#define MkObjectLogType_2 ( obj,
fmtobj )
Value:
MkObjectLogType(obj,fmtobj,0,__func__,0)

Definition at line 1635 of file kernel_overload_mk.h.

◆ MkObjectLogType_3

#define MkObjectLogType_3 ( obj,
fmtobj,
debug )
Value:
MkObjectLogType(obj,fmtobj,debug,__func__,0)

Definition at line 1634 of file kernel_overload_mk.h.

◆ MkObjectLogType_4

#define MkObjectLogType_4 ( obj,
fmtobj,
debug,
callfunc )
Value:
MkObjectLogType(obj,fmtobj,debug,callfunc,0)

Definition at line 1633 of file kernel_overload_mk.h.

◆ MkObjectLogType_NULL

#define MkObjectLogType_NULL ( ...)
Value:

Definition at line 1631 of file kernel_overload_mk.h.

Function Documentation

◆ MkDbgV_RT()

void MkDbgV_RT ( MK_RT mkrt,
MK_OBJN fmtobj,
MK_STRN const callfunc,
FILE * FH,
MK_FST const printfmt,
... )

write a printf style debug-message to FH using the internal format …

Use the format and the restrictions from LogC.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]FHthe filehandle to write into
[in]printfmtis a c-string used as printf like format string

◆ MkLogC_RT()

void MkLogC_RT ( MK_RT mkrt,
MK_OBJN fmtobj,
MK_STRN const message,
MK_DBG const debug,
MK_STRN const callfunc )

write a logging-message to MkLogFileC (default: stderr) using the internal format …

The logging is only done if 'MqDebug >= level' and 'MqIsSilent == MK_NO' using the following format:

C> (NAME:PID:THREADID) [YYYY-MM-DD:HH-MM-SS] [String|Binary-DEBUGLEVEL-CONTEXTID-REFCOUNT-CONTEXTPTR-prefix]: message

The message is build with snprintf and finally send with fputsn without newline '\n' character at the end. To add the newline or an other special-caracter use the '\xxx' syntax.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]messagestring to log

◆ MkLogHEX_RT()

void MkLogHEX_RT ( MK_RT mkrt,
MK_OBJN fmtobj,
MK_STRN const callfunc,
MkBinaryR const data )

log binaray data as HEX into the MkLogFileC (default: stderr) …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]datathe binary data to log

◆ MkLogV_RT()

void MkLogV_RT ( MK_RT mkrt,
MK_OBJN fmtobj,
MK_STRN const callfunc,
MK_DBG debug,
MK_FST const printfmt,
... )

write a printf style logging-message to MkLogFileC (default: stderr) using the internal format …

Use the format and the restrictions from LogC.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]printfmtis a c-string used as printf like format string

◆ MkLogVL_RT()

void MkLogVL_RT ( MK_RT mkrt,
MK_OBJN fmtobj,
MK_STRN const callfunc,
MK_DBG debug,
MK_FST const printfmt,
va_list var_list )

write a vprintf style logging-message to MkLogFileC using the internal format …

Use the format and the restrictions from LogC.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]printfmtis a c-string used as printf like format string
[in]var_lista variable argument list object

◆ MkObjectLog_RT()

void MkObjectLog_RT ( MK_RT mkrt,
MK_OBJN const obj,
MK_OBJN fmtobj,
MK_DBG const debug,
MK_STRN const callfunc,
MK_I32 const lvl )

Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …

The Log slot is used to write a summary of an object to the logging-device defined by MkLogFileOpen and default to stderr.

The Log slot is calling the Log slot of the obj which is defined at object-setup (example: MkBufferC)

#define MkBufferST
instance-type as MkTypeDefS-class-type …
void MkBufferLog_RT(MK_RT mkrt, MK_BUFN const buf, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkBufferC …
void(* MkLogF)(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmt, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
#define MkTYP_R(x)
cast a known-managed-object into an MkTypeS reference

The log-format depending on the obeject to log. A common-prefix and a object-specific-postfix is usually available

Example: logging of a buffer object in RUBY :
require "rbmkkernel"
include MkKernel

buf = MkBufferC.CreateSTR("Hallo World")

buf.Log()

----------------------------------------------------
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }: BUFFER [0x1ccd500] { cursize=11 }                                                                    
|   |                    |          |                   | |      |         |     |                   |                                |
|   |                    |          |                   | |      |         |     |                   |                                ^ specific: START of the MkBufferC-log
|   |                    |          |                   | |      |         |     |                   ^ calling function
|   |                    |          |                   | |      |         |     ^ MqContextC: pointer
|   |                    |          |                   | |      |         ^ ref-count
|   |                    |          |                   | |      ^ MqContextC: context-id
|   |                    |          |                   | ^ debug-level
|   |                    |          |                   ^ MqContextC: S)tring, B)inary, X)none
|   |                    |          ^ thread-id
|   |                    ^ process-id
|   ^ class-name or MqContextC: object-name
^ MqContextC: S)erver, C)hild or X)none

X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:   | OBJECT [0x1ccd500] { check=Y, netHdl=0, refCnt=1, isLocal=Y, sig=59b30440, objRt=0x1cc9ef0 }
                                                                                                                                          ^ common : START of the MkObjectC-log
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:     | SELF { self=0x7fd7690d82a0, selfCreated=Y, selfRef=0 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:     | TYPE [MkBuffer64C] { noSelf=N, delCbCnt=0, typsize=320 }
                                                                                                                                            ^ common: start of the type-log
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:       | OBJECT { type=MkTypeC, ptr=0x1ccaad0, self=(nil), refCnt=1000005, isLocal=N }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:       | obj { sig=0x59b30440, mask=0xffffffc0, size=184 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:       | constrF=N, destrF=Y, dupF=Y, dup2F=Y, mergeF=Y, resetF=Y, logF=Y
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:       | selfCrF=Y, selfDeF=Y, selfUlF=Y, allocF=Y, freeF=Y
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:       | BASE [MkBufferC] { noSelf=N, delCbCnt=0, typsize=320 }
                                                                                                                                              ^ common: start of the base-type-log (multiple times until 'MkTypeDefC'
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:         | OBJECT { type=MkTypeC, ptr=0x1cca990, self=(nil), refCnt=1000009, isLocal=N }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:         | obj { sig=0x59b30400, mask=0xfffffc00, size=120 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:         | constrF=N, destrF=Y, dupF=Y, dup2F=Y, mergeF=Y, resetF=Y, logF=Y
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:         | selfCrF=Y, selfDeF=Y, selfUlF=Y, allocF=N, freeF=N
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:         | BASE [MkObjectC] { noSelf=N, delCbCnt=0, typsize=320 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:           | OBJECT { type=MkTypeC, ptr=0x1cca850, self=(nil), refCnt=1000008, isLocal=N }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:           | obj { sig=0x59b30000, mask=0xffff0000, size=88 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:           | constrF=N, destrF=Y, dupF=N, dup2F=Y, mergeF=N, resetF=N, logF=Y
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:           | selfCrF=Y, selfDeF=Y, selfUlF=Y, allocF=N, freeF=N
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:           | BASE [MkTypeDefC] { check=Y, ptr=0x1ccc3d0, refCnt=1000000, self=(nil) }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:   | storage { first=0x1ccd578(ILS=Y), size=63, doFree=N }
                                                                                                                                          ^ specific : START of the MkBufferC-data-log
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:   | ils     { size=64, offset=120 }
X> {MkBuffer64C         :pid(53689):tid(0x7fd7844b4740):X:dlv(0):ctxId( 0):rc(1):ctx(0x1ccd500     ):<main>                        }:   | STRT :      11 : Hallo World
----------------------------------------------------
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]objthe MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)
See also
MkBufferLog, MkBufferListLog, MkBufferStreamLog, ?MkLogFileLog, MkErrorLog, MkRuntimeLog0, MkObjectLog

◆ MkObjectLogLong_RT()

void MkObjectLogLong_RT ( MK_RT mkrt,
MK_OBJN const obj,
MK_OBJN fmtobj,
MK_DBG const debug,
MK_STRN const callfunc,
MK_I32 const lvl )

log the MkObjectS verbose into the MkLogFileC (default: stderr) …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]objthe MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)
See also
MkObjectC (runtime) void MkObjectLog(MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)

◆ MkObjectLogShort_RT()

void MkObjectLogShort_RT ( MK_RT mkrt,
MK_OBJN const obj,
MK_OBJN fmtobj,
MK_DBG const debug,
MK_STRN const callfunc,
MK_I32 const lvl )

log the MkObjectS into the MkLogFileC (default: stderr) …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]objthe MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)
See also
MkObjectC

◆ MkObjectLogType_RT()

void MkObjectLogType_RT ( MK_RT mkrt,
MK_OBJN const obj,
MK_OBJN fmtobj,
MK_DBG const debug,
MK_STRN const callfunc,
MK_I32 const lvl )

log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]objthe MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)
See also
MkObjectC (runtime) void MkObjectLog(MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)