Forum Discussion

SZ_1's avatar
SZ_1
Occasional Contributor
7 years ago

FontColor set by LogAttributes not applied to the text posted by Log.Warning

Here is my code:

 

// Specifies new attributes for warning messages
var attrWarning = Log.CreateNewAttributes();
attrWarning.Bold = true;
attrWarning.FontColor = clRed;

 

Log.Warning("Warning message should be red", "", pmNormal, attrWarning );

 

Actual result:

The text in the log is black and bold

 

I am not sure why red color was not applied. Bold was applied correctly.

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    It's a bug.

    if you replace 'Warning' with 'Message' it worked perfectly OK

    please submit a support case here

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Worked fine for me.... the trick is this... if you have the warning line highlighted, it "selects" the line which gives it a different color scheme.  However, if you click on a different line in the log so you can see the warning, it works fine.  First screenshot below shows the warning line "selected" and it appears to be incorrect.  Second screenshot shows the message line selected which then shows that the warning has the correct font color applied.

    Warning line selectedMessage line selected