Unsure why this is not working, probably some niche reason I am unaware of.
I have two scripts that are involved here,
def universalPrint(message): """ Will work for vision or perspective clients now. Args: message: str, what do you want to print Returns: None """ from env import isVision if isVision(): print message else: import system.perspective system.perspective.print(message)
This has works fine and has been use in use for a while.
My new script which is printing, but is not logging, is
def logInfoAndPrint(message, loggerName): """ For instances where we want to both log to the server but also print to console for easier debugging. Args: message: anything as we type cast in this function for ease of use, what are we trying to print loggerName: str, what logger are we saving this to """ import system.util logger = system.util.getLogger(loggerName) universalPrint(str(message)) universalPrint("about to log") logger.info(message) universalPrint("logged")
It gets to print the last “logged” statement, but I do not see the actual logged statement in my server logs.
In my console, I see
test message about to log 09:01:55.877 [AWT-EventQueue-0] INFO test logger - test message logged
Any ideas whats going on here? Is this not possbile?