Skip to content

Commit

Permalink
*: add FUO_LOG_TO_FILE envvar and enable it by default on pyinstaller…
Browse files Browse the repository at this point in the history
… env (#781)
  • Loading branch information
cosven authored Jan 25, 2024
1 parent 6164f48 commit 62dd58a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion feeluown/entry_points/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def setup_config(args, config):
config.DEBUG = args.debug or config.DEBUG
config.VERBOSE = args.verbose or config.VERBOSE
config.MPV_AUDIO_DEVICE = args.mpv_audio_device or config.MPV_AUDIO_DEVICE
config.LOG_TO_FILE = bool(args.log_to_file or config.LOG_TO_FILE)
config.LOG_TO_FILE = bool(args.log_to_file or config.LOG_TO_FILE or
os.getenv('FUO_LOG_TO_FILE'))

if args.cmd is not None:
config.MODE = App.CliMode
Expand Down
1 change: 1 addition & 0 deletions feeluown/pyinstaller/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
if hasattr(sys, '_MEIPASS'):
os.chdir(sys._MEIPASS)

os.environ.setdefault('FUO_LOG_TO_FILE', '1')
feeluown.__main__.main()

0 comments on commit 62dd58a

Please sign in to comment.