EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
Log files don't appear when running MUSE from a Python script
- 主要言語
- Python
- スター
- 29
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
If you run muse from the command line (e.g. `muse settings.toml`), you'll get a couple of log files appearing in the results folder.
Another way of running MUSE is from a Python script, for example:
```
from logging import getLogger
from muse.mca import MCA
from muse.readers.toml import read_settings
from pathlib import Path
current_script_path = Path(__file__).resolve()
path_settings = current_script_path.parent / 'settings.toml'
settings = read_settings(path_settings)
getLogger("muse").setLevel(settings.log_level)
model = MCA.factory(settings)
model.run()
```
However, in this case the log files don't appear.
We could make users call `add_file_logger()` manually when running muse from a script, but it would be nice if this was the default behaviour without users having to do this
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start by tracing how `MCA.factory(settings)` and `model.run()` configure logging when MUSE is launched from a script, and compare that with the command-line path. Inspect the existing `add_file_logger()` entry point and verify that script-based runs create the expected log files in the results folder without requiring a manual call.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100