How to retrieve WB extensions Log Output as a String in ACT console?
Best Answer
Answers
-
Hi Ayush, can you add a bit more context to your question? It's not clear what sort of log output you're looking for here.
0 -
Hi James (@James Derrick) , Thanks for the feedback, added some context, I hope this clarifies the question!
0 -
That's great Ayush, thanks!
0 -
Hi all,
Is it possible to retrieve the count of error/warning messages in the log?
Let's say I use ExtAPI.Log.WriteError(...) several times in the code and I would like to know, how many times these error messages were written to the log.
0 -
@Josef Behal
Log.Stream.ToString()
is a string, you can save that in a variable and search for number of occurrences of a particular string. For example:0 -
Yes, this is obvious. In this case, I need to write every time something like ExtAPI.Log.WriteError(Error, error message....) or somehow wrap this function.
Do I understand correctly that WriteError function just formats the text and does not add any object properties, for example as mechanical error message does?
0 -
@Josef Behal, that is correct.
WriteError
expects only a string argument. That argument is rendered as an Error message in ACT Log in red.0 -
OK, thank you.
0