diff --git a/src/azure-cli-core/azure/cli/core/azlogging.py b/src/azure-cli-core/azure/cli/core/azlogging.py index ae4b1e580bd..603a08af4d3 100644 --- a/src/azure-cli-core/azure/cli/core/azlogging.py +++ b/src/azure-cli-core/azure/cli/core/azlogging.py @@ -30,7 +30,7 @@ from azure.cli.core.commands.events import EVENT_INVOKER_PRE_CMD_TBL_TRUNCATE from knack.events import EVENT_CLI_POST_EXECUTE -from knack.log import CLILogging, get_logger +from knack.log import CLILogging, get_logger, LOG_FILE_ENCODING from knack.util import ensure_dir @@ -112,7 +112,7 @@ def _init_command_logfile_handlers(self, command_metadata_logger, args): log_file_path = os.path.join(self.command_log_dir, log_name) get_logger(__name__).debug("metadata file logging enabled - writing logs to '%s'.", log_file_path) - logfile_handler = logging.FileHandler(log_file_path) + logfile_handler = logging.FileHandler(log_file_path, encoding=LOG_FILE_ENCODING) lfmt = logging.Formatter(_CMD_LOG_LINE_PREFIX + ' %(process)d | %(asctime)s | %(levelname)s | %(name)s | %(message)s') # pylint: disable=line-too-long logfile_handler.setFormatter(lfmt) diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py index 1bec39e3471..61b8dd6aa08 100644 --- a/src/azure-cli-core/setup.py +++ b/src/azure-cli-core/setup.py @@ -50,7 +50,7 @@ 'cryptography>=3.2,<3.4', 'humanfriendly>=4.7,<10.0', 'jmespath', - 'knack~=0.8.1', + 'knack~=0.8.2', 'msal>=1.10.0,<2.0.0', # Dependencies of the vendored subscription SDK # https://github.com/Azure/azure-sdk-for-python/blob/ab12b048ddf676fe0ccec16b2167117f0609700d/sdk/resources/azure-mgmt-resource/setup.py#L82-L86 diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index e6d92db98f2..957b6c8b5d9 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -105,7 +105,7 @@ isodate==0.6.0 Jinja2==2.11.3 jmespath==0.9.5 jsmin==2.2.2 -knack==0.8.1 +knack==0.8.2 MarkupSafe==1.1.1 mock==4.0.2 msal==1.10.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index 1d8c9053d49..3db9b6286e7 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -105,7 +105,7 @@ isodate==0.6.0 Jinja2==2.11.3 jmespath==0.9.5 jsmin==2.2.2 -knack==0.8.1 +knack==0.8.2 MarkupSafe==1.1.1 mock==4.0.2 msal==1.10.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index b6451eedd77..305de1b2f82 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -104,7 +104,7 @@ isodate==0.6.0 Jinja2==2.11.3 jmespath==0.9.5 jsmin==2.2.2 -knack==0.8.1 +knack==0.8.2 MarkupSafe==1.1.1 mock==4.0.2 msal==1.10.0