Skip to content

fix: support 'time' and 'levelname' in default config #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 5, 2024
Merged

Conversation

KyleKing
Copy link
Owner

@KyleKing KyleKing commented Oct 2, 2024

For: https://github.com/marselester/json-log-formatter/blob/f8d79df935f82b068611e6e01ff1e0577b92ce19/json_log_formatter/__init__.py#L184

And resolve:

Traceback (most recent call last):
  File "/Users/kyleking/.local/bin/tail-jsonl", line 8, in <module>
    sys.exit(start())
             ^^^^^^^
  File "<@beartype(tail_jsonl.scripts.start) at 0x1064cfc40>", line 11, in start
  File "/Users/kyleking/.local/pipx/venvs/tail-jsonl/lib/python3.12/site-packages/tail_jsonl/scripts.py", line 41, in start
    config = _load_config(options.config_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<@beartype(tail_jsonl.scripts._load_config) at 0x104eb6700>", line 35, in _load_config
  File "/Users/kyleking/.local/pipx/venvs/tail-jsonl/lib/python3.12/site-packages/tail_jsonl/scripts.py", line 23, in _load_config
    user_config = tomllib.loads(Path(config_path).read_text(encoding='utf-8'))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1027, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '~/.config/tail-jsonl/config.toml'

Generally document how the configuration file is found (only manually)

@KyleKing KyleKing self-assigned this Oct 2, 2024
@KyleKing KyleKing changed the title fix: support 'time' fix: support 'time' and 'levelname' in default config Oct 2, 2024
@KyleKing KyleKing marked this pull request as ready for review October 5, 2024 01:08
@KyleKing KyleKing merged commit 25a0079 into main Oct 5, 2024
4 checks passed
@KyleKing KyleKing deleted the feat-time branch October 5, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant