Best way logging some messages output to different log file

Hi
As I’m writing some functions that do some processing on configurations I want to log some output as follows to some other file
logging.info('** Merging ACLy and ACLz**)
or
logging.warn(f'** Duplicate entries on ACLx and ACLx {ace}**)
but when I modify logging config similar to this
logging.basicConfig(filename='mytask.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s')

I get this waring:
ConflictingConfigurationWarning: Native Python logging configuration has been detected, but Nornir logging is enabled too. This can lead to unexpected logging results. Please set logging.enabled config to False to disable automatic Nornir logging configuration. Refer to https://nornir.readthedocs.io/en/stable/configuration/index.html#logging

Is there a way to send some logs to a log file other than nornir.log ?
Thanks

Yes, python supports that but you are going to have to look into using dictConfig instead so you can configure it accordingly.