Skip to content

Commit

Permalink
remove default log file writing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhakulin committed May 7, 2024
1 parent 8f1fc23 commit d9f6fba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/azure-ai-assistant/azure/ai/assistant/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "0.3.3a1"
VERSION = "0.3.4a1"
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _set_last_modified_assistant(self):
latest_assistant_name = None

for assistant_name, assistant_config in self._configs.items():
file_path = os.path.join(self._config_folder, f"{assistant_name}_assistant_config.json")
file_path = os.path.join(self._config_folder, f"{assistant_name}_assistant_config.yaml")
try:
mod_time = os.path.getmtime(file_path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def setup_logger() -> logging.Logger:
# Environment variable check for console logging
log_to_console = os.getenv('ASSISTANT_LOG_TO_CONSOLE', 'false').lower() in ('true', '1', 't')

# Default to file logging if ASSISTANT_LOG_TO_CONSOLE is not 'true'
if not log_to_console:
log_to_file = os.getenv('ASSISTANT_LOG_TO_FILE', 'false').lower() in ('true', '1', 't')

if log_to_file:
# Set the file handler with UTF-8 encoding for file output
file_handler = logging.FileHandler('assistant.log', encoding='utf-8')
file_handler.setFormatter(formatter)
Expand Down

0 comments on commit d9f6fba

Please sign in to comment.