0

What I am looking to accomplish is needing to parse sql results for the word error which will be sent to a logmessage in ELsastic with a -loglevel of "error" when the word error is present.

What I have already implemented is

LogMessge -messagetolog $messageStringBuilder.ToString() -loglevel "information"

As of right now all messages received in Elastic have a loglevel of information looking to modify my sqls to return the word error when results aren't as expected and for powershell to loglevel error instead of information.

I was thinking that $condition= true and false but not sure if this is the best path.

0 Answers0