Hi all,
I would like to use logging facility of SYS/BIOS. Instead of just using a single diagnostics bit (like Diags_USER1) to enable the event, I want to be sure that more than one mask is enabled. For example; I want to print a message when BOTH Diags_ENTRY and Diags_USER1 [1] enabled in the configuration [2]. However, logger prints the message when EITHER Diags_ENTRY or Diags_USER1 enabled, which is not what I want to do.
I followed the guidelines to create a custom log event in the example [3]. Is it possible to define more than one message [4] for each Log_Event, like different number/type of arguments or even message texts. Ex: msg: "Thread %d" and msg: "User %s with ID %d" ?
Moreover, I wonder if it is possible to define new Diags_XX like Diags_USER1 in order to extend the these mask bits. At least an easy way without modifying the source code of XDCTools and etc.
Thanks in advance
[1]
Log_print0(Diags_ENTRY | Diags_USER1, "Message");
[2]
Main.common$.diags_ENTRY = Diags.ALWAYS_ON;
Main.common$.diags_USER1 = Diags.ALWAYS_ON;
[3]
http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Logging/Example_6
[4]
module Events { config Log.Event HELLO = { mask: Diags.ENTRY, msg: "%d: Hello world!" }; }