Reply
Highlighted
New Member

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.

Community Leader

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

It's a bug.

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

please submit a support case here

Posts: 4,657
Topics: 42
Kudos: 1,857
Solutions: 367
Registered: ‎11-30-2009

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

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 selectedWarning line selectedMessage line selectedMessage line selected


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program