theKernel 10.0
Loading...
Searching...
No Matches
MkObjectC_Log_CS_API

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

+ Collaboration diagram for MkObjectC_Log_CS_API:

Functions

void csmkkernel.MkObjectC.LogC (string message, int debug=0, [CallerMemberName]string callfunc=null)
  C#: fmtobj.LogC(string message, int debug = 0, [CallerMemberName]string callfunc = null) C-API
write a logging-message to MkLogFileC (default: stderr) using the internal format …
 
void csmkkernel.MkObjectC.LogHEX (string callfunc, byte[] data)
  C#: fmtobj.LogHEX(string callfunc, byte[] data) C-API
log binaray data as HEX into the MkLogFileC (default: stderr) …
 
void csmkkernel.MkObjectC.Log (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0)
  C#: obj.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …
 
void csmkkernel.MkObjectC.LogLong (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0)
  C#: obj.LogLong(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the MkObjectS verbose into the MkLogFileC (default: stderr) …
 
void csmkkernel.MkObjectC.LogShort (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0)
  C#: obj.LogShort(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the MkObjectS into the MkLogFileC (default: stderr) …
 
void csmkkernel.MkObjectC.LogType (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0)
  C#: obj.LogType(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …
 

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=null → use default-format)
[in]callfunca user-defined postfix to identify the calling-function or the environment (default = name-of-function, null = resolve-own-name)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)

Function Documentation

◆ Log()

void csmkkernel.MkObjectC.Log ( MkObjectC fmtobj = null,
int debug = 0,
[CallerMemberName] string callfunc = null,
int lvl = 0 )
inline

C#: obj.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …

Definition at line 527 of file MkObjectC.cs.

527 {
528 IntPtr fmtobj_hdl = MkObjectC.getOBJ_null_allow(fmtobj);
529 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
530 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
531 Mk.MkObjectLog(mkrt, hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
532 Marshal.FreeHGlobal(callfunc_cstr);
533 }
csmkkernel.MkKernel Mk

◆ LogC()

void csmkkernel.MkObjectC.LogC ( string message,
int debug = 0,
[CallerMemberName] string callfunc = null )
inline

C#: fmtobj.LogC(string message, int debug = 0, [CallerMemberName]string callfunc = null) C-API
write a logging-message to MkLogFileC (default: stderr) using the internal format …

Definition at line 506 of file MkObjectC.cs.

506 {
507 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
508 IntPtr message_cstr = Marshal.StringToHGlobalAnsi(message);
509 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
510 Mk.MkLogC(mkrt, hdl_null_allow, message_cstr, debug, callfunc_cstr);
511 Marshal.FreeHGlobal(message_cstr);
512 Marshal.FreeHGlobal(callfunc_cstr);
513 }

◆ LogHEX()

void csmkkernel.MkObjectC.LogHEX ( string callfunc,
byte[] data )
inline

C#: fmtobj.LogHEX(string callfunc, byte[] data) C-API
log binaray data as HEX into the MkLogFileC (default: stderr) …

Definition at line 516 of file MkObjectC.cs.

516 {
517 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
518 var data_size = Marshal.SizeOf(data[0]) * data.Length;
519 var data_data = Marshal.AllocHGlobal(data_size);
520 Marshal.Copy(data,0,data_data,data_size);
521 Mk.MkBinaryR data_ref = Mk.MkBinaryCreate(data_size,data_data);
522 Mk.MkLogHEX(mkrt, hdl_null_allow, callfunc_cstr, data_ref);
523 Marshal.FreeHGlobal(callfunc_cstr);
524 }

◆ LogLong()

void csmkkernel.MkObjectC.LogLong ( MkObjectC fmtobj = null,
int debug = 0,
[CallerMemberName] string callfunc = null,
int lvl = 0 )
inline

C#: obj.LogLong(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the MkObjectS verbose into the MkLogFileC (default: stderr) …

Definition at line 536 of file MkObjectC.cs.

536 {
537 IntPtr fmtobj_hdl = MkObjectC.getOBJ_null_allow(fmtobj);
538 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
539 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
540 Mk.MkObjectLogLong(mkrt, hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
541 Marshal.FreeHGlobal(callfunc_cstr);
542 }

◆ LogShort()

void csmkkernel.MkObjectC.LogShort ( MkObjectC fmtobj = null,
int debug = 0,
[CallerMemberName] string callfunc = null,
int lvl = 0 )
inline

C#: obj.LogShort(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the MkObjectS into the MkLogFileC (default: stderr) …

Definition at line 545 of file MkObjectC.cs.

545 {
546 IntPtr fmtobj_hdl = MkObjectC.getOBJ_null_allow(fmtobj);
547 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
548 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
549 Mk.MkObjectLogShort(mkrt, hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
550 Marshal.FreeHGlobal(callfunc_cstr);
551 }

◆ LogType()

void csmkkernel.MkObjectC.LogType ( MkObjectC fmtobj = null,
int debug = 0,
[CallerMemberName] string callfunc = null,
int lvl = 0 )
inline

C#: obj.LogType(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …

Definition at line 554 of file MkObjectC.cs.

554 {
555 IntPtr fmtobj_hdl = MkObjectC.getOBJ_null_allow(fmtobj);
556 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
557 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
558 Mk.MkObjectLogType(mkrt, hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
559 Marshal.FreeHGlobal(callfunc_cstr);
560 }