is there any way in python such that we can log in the logger file only when enable_log="true"
i have used a file handler to create a log file
add file handler only if enable_log is True
or you can specify different levels, e.g. DEBUG for file handler
(Jun-27-2018, 01:33 PM)buran Wrote: [ -> ]add file handler only if enable_log is True or you can specify different levels, e.g. DEBUG for file handler
But adding file handler only if enable log is true diesnt work as i have passed logger as a function parameter also. It raises error there