Best way logging some messages output to different log file

As I’m writing some functions that do some processing on configurations I want to log some output as follows to some other file'** Merging ACLy and ACLz**)
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

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

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