config_log function

almapiwrapper.config_log(file_name: str | None = '') None

Configure application logging.

This function initializes logging for the entire process. Log messages are written to a file, and the necessary directories are created automatically if they do not exist.

  • If file_name contains a path (e.g. logs/subdir/mylog), all required directories are created.

  • If file_name is just a file name, the log file is created in the ./log/ directory.

  • If file_name is empty, the log file ./log/log.txt is used.

  • The log file name is determined automatically from file_name.

  • Log messages are also output to standard output (the console).

Parameters:

file_name – Optional string containing the name of the log file (may include a relative or absolute path).

Returns:

None