From 809833ae207fdd9a233a91dad4095f8ae2d7c834 Mon Sep 17 00:00:00 2001 From: Toshi Aoyama Date: Tue, 28 Mar 2023 23:12:01 +0900 Subject: [PATCH] Correct console device path (Fix #1690) Current code initialize self.con_path as /dev/stdout by waagent.LoggerInit(). If self.con_path is /dev/stdout, stdout is broken by WriteToConsole() in main/Utils/waagent because WriteToConsole is a function for write message to /dev/console. This patch fix the issue. --- VMEncryption/main/Utils/HandlerUtil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VMEncryption/main/Utils/HandlerUtil.py b/VMEncryption/main/Utils/HandlerUtil.py index 5e6934a6f..681e62e29 100644 --- a/VMEncryption/main/Utils/HandlerUtil.py +++ b/VMEncryption/main/Utils/HandlerUtil.py @@ -405,7 +405,7 @@ def try_parse_context(self): def _change_log_file(self): #self.log("Logging to " + self._context._log_file) - waagent.LoggerInit(self._context._log_file,'/dev/stdout') + waagent.LoggerInit(self._context._log_file,'/dev/console') self._log = waagent.Log self._error = waagent.Error