Skip to content

Commit 1962d6f

Browse files
Merge pull request #9 from nbusseneau/pr/fix-missing-file-logging
fix missing file logging
2 parents d89fd30 + 88d0808 commit 1962d6f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

modimporter.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
import xml.etree.ElementTree as xml
1919

2020
# Logging configuration
21-
logging.basicConfig(format='%(message)s')
21+
logging.basicConfig(
22+
format='%(message)s',
23+
handlers=[
24+
logging.FileHandler("modimporter.log.txt", mode='w'),
25+
logging.StreamHandler(),
26+
],
27+
)
2228
LOGGER = logging.getLogger('modimporter')
2329
LOGGER.setLevel(logging.INFO)
2430

@@ -49,8 +55,6 @@
4955

5056
game_aliases = {"Resources":"Hades"} #alias for temporary mac support
5157

52-
logging.basicConfig(filename="modimporter.log.txt",filemode='w')
53-
5458
modsdir = "Mods"
5559
modsrel = ".."
5660
gamerel = ".."

0 commit comments

Comments
 (0)