Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello,
I am developing a extension for ThingWorx application and trying to log the errors and warnings in the Application Log file using below code.
private static final Logger _logger = LogUtilities.getInstance().getApplicationLogger(CG_Authenticator.class)
_logger .info("Test Info Logger message")
I am able to see the log messages in the Application Log, but the User column is showing as "????" in the logs. Please refer below image.
Can someone provide any inputs, what am I missing or there is any additional configuration for loggers that is needed?
Thanks & Regards,
Bhushan
Bhushan,
Thanks for posting your question. The most likely reason the user column is empty is because the user session is not yet established. You can use code like this
user = Resources["CurrentSessionInfo"].GetCurrentUser();
_logger.info("Test Info Logger message" + user);
to get session user and print it into the log.
Hope this helps,
--Marek