I can't seem to get dynamic (run-time) masking to work, i.e., the messages get generated regardless. So let's just start at the beginning.
Throughout my application, I have hundreds of various Log_printN( Diags_USERM, "" ) statements where I use Diags_USER1 for error messages, Diags_USER2 for trace messages, etc.
What module controls these? The documentation states (I think) that it's 'xdc.runtime.Main," so put the following in my .cfg file:
var Main = xdc.useModule( 'xdc.runtime.Main' );
Main.common$.diags_USER1 = Diags.RUNTIME_ON;
Main.common$.diags_USER2 = Diags.RUNTIME_ON;
Main.common$.diags_USER3 = Diags.RUNTIME_ON;
Main.common$.diags_USER4 = Diags.RUNTIME_ON;
Main.common$.diags_USER5 = Diags.RUNTIME_ON;
Main.common$.diags_USER6 = Diags.RUNTIME_ON;
And then in my application (in main), I tried the following:
Diags_setMask( "xdc.runtime.Main-2" );
...to turn off the trace messages, but, sadly, they still get generated. I even tried changing 'Main' to 'Default' to cover EVERY module, but still they show up. Same thing with the the setMask call, i.e., I used the '%-2' wildcard to turn off ALL USER2 message from all modules, but they still get generated! What am I doing wrong?