Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
One of the most effective ways of debugging services created in Composer is to utilize the Thingworx Monitor. However, it seems that only logger.warn and logger.error actually log text to the monitor. Is there something special I should know when using logger.info and logger.debug snippets to have them log to monitor thread?
Thank you ahead of time!
Solved! Go to Solution.
Hi Christopher,
Maybe either I was clear Please, read my post, and do what it says there:
Hi Christopher,
Once you are on ThingWorxMonitor you should go to Settings tab and change preferences to Info/Debug to decide the log level you want.
Best Regards,
Carles.
Maybe I wasn't clear; I'm not asking how to view in Monitor. I know how that is supposed to work.
My question/problem is on the scripting side. When I use "logger.info(...)" or "logger.debug(...)" in a services scripting; then execute the service, it's not writing into server log. Therefore, it's not showing up in the Monitor regardless of filtering.
So my question, "Why?".
I don't have the problem with "logger.warn(...)" and "logger.error(...)"; these work and the output shows up in the Monitor log as expected.
Hi Christopher,
Maybe either I was clear Please, read my post, and do what it says there:
Carles, I appreciate your input to this. Please see where I've set the Settings; but my logging doesn't show up in the Log. I believe there's a bug in the platform that's preventing the "logger.warn(...)" and "logger.error(...)" functions from actually working correctly. I'm asking this as a question because I'm afraid I'm simply doing something wrong.
Hi Chris, I suggest you open a tech support ticket on this and we will do a necessary investigation to catch a possible defect.
Polina, I wanted to make sure I wasn't doing something wrong; before I logged a ticket.
Carlos, thank you!! You called it. I guess I had to refresh browser a couple times after I changed the settings; but it seems to be showing me the INFO and DEBUG data in the log now!! Thank you ever so much!
Hi Christopher,
It only logs the messages when Settings are on for the desired log level, otherwise it doesn't logs it.
Carles.
Very good to know!!