from qidle import main
import logging

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    main()

import sys
from qidle import main
import logging

if __name__ == '__main__':
    filename = None
    if sys.platform == 'win32':
        filename = 'qidle.log'
    logging.basicConfig(level=logging.INFO, filename=filename)
    main()

Add a log file on windows
Add a log file on windows

+ import sys
  from qidle import main
  import logging
  
  if __name__ == '__main__':
+     filename = None
+     if sys.platform == 'win32':
+         filename = 'qidle.log'
-     logging.basicConfig(level=logging.INFO)
+     logging.basicConfig(level=logging.INFO, filename=filename)
      main()
  
Add a log file on windows
## Code Before:
from qidle import main
import logging

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    main()

## Instruction:
Add a log file on windows
## Code After:
import sys
from qidle import main
import logging

if __name__ == '__main__':
    filename = None
    if sys.platform == 'win32':
        filename = 'qidle.log'
    logging.basicConfig(level=logging.INFO, filename=filename)
    main()
