New GitHub issue #95850 from youssefbenfarhat:<br>

<hr>

<pre>
I'm getting this error while trying to log some informations : 

-- Logging error ---
Traceback (most recent call last):
  File "/home/yf/miniconda3/envs/grafenv/lib/python3.9/logging/__init__.py", line 1086, in emit
    stream.write(msg + self.terminator)
AttributeError: 'str' object has no attribute 'write'


This is my logging_conf.ini: 

[loggers]
keys=root

[handlers]
keys= fileHandler,consoleHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=INFO
handlers=fileHandler,consoleHandler

[handler_fileHandler]
class=FileHandler
level=INFO
formatter=simpleFormatter
args=("./loggers/logs.log",)

[handler_consoleHandler]
class=StreamHandler
level=INFO
formatter=simpleFormatter
args=("./loggers/logs.log",)

[formatter_simpleFormatter]
format = %(levelname)s : %(name)s : %(module)s : %(funcName)s : %(lineno)s : %(message)s



This is how I'm initializing the logger: 

LOGGER_CONFIG=yaml_loader('./app_config/config.yaml')["logger"]
logging.config.fileConfig(LOGGER_CONFIG['config_file_path'])
LOGGER=logging.getLogger()

and this is how I'm calling the logger:
LOGGER.info("Process ID {} started at {} ".format(message.value["ProcessId"],  "'"+message.value["ProcessDateTime"]+"'"))
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/95850">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>