6import isystem.connect
as ic
13 connMgr = ic.ConnectionMgr()
14 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 print(f
"Current logger ID: {connMgr.getId()}")
17 print(
"Initialize new logger...")
18 connMgr.initLogger(
"test_logger",
"test_logger_out.py", ic.CLogger.PYTHON)
19 logger = connMgr.getLogger()
23 logger.createVar(
"someInt",
"int")
24 logger.log(
"someInt = 42")
26 logger.logc(
"my visible comment")
29 logger.logc(
"will not be visible")
32 logger.closeLog(
"# end comment")
34 filePath =
"test_logger_out.py"
35 print(f
"Content of the created log file: {filePath}")
36 with open(filePath,
"r")
as fHandler:
38 print(fHandler.read())
42if __name__ ==
"__main__":