Skip to content
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

feat(iroh): allow setting the logging directory via config file #2391

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

divagant-martian
Copy link
Contributor

Description

Adds the options to set the directory where logs will be created in the config file.

Example:

[file_logs]
rust_log = "iroh=info"
rotation = "daily"
max_files = 1
dir = "/home/me/my_logs"

It is recommended that the path is absolute, otherwise it will be interpreted as relative to the execution dir. If this option is not set, the default <IROH_DATA_DIR>/logs will be used.

Breaking Changes

N/a

Notes & open questions

N/a

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@divagant-martian divagant-martian added this to the v0.19.0 milestone Jun 20, 2024
@divagant-martian divagant-martian self-assigned this Jun 20, 2024
@divagant-martian divagant-martian linked an issue Jun 20, 2024 that may be closed by this pull request
Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward.

We should have some tests for config file parsing where we could add this, but maybe not in this PR. Would be good if this makes it into the next release since this was a user request.

@divagant-martian divagant-martian added this pull request to the merge queue Jun 21, 2024
Merged via the queue into n0-computer:main with commit 600ba8c Jun 21, 2024
25 checks passed
ppodolsky pushed a commit to izihawa/iroh that referenced this pull request Jun 22, 2024
…omputer#2391)

## Description

Adds the options to set the directory where logs will be created in the
config file.

**Example:**
```toml
[file_logs]
rust_log = "iroh=info"
rotation = "daily"
max_files = 1
dir = "/home/me/my_logs"
```

It is recommended that the path is absolute, otherwise it will be
interpreted as relative _to the execution dir_. If this option is not
set, the default `<IROH_DATA_DIR>/logs` will be used.


## Breaking Changes

N/a

## Notes & open questions

N/a

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Make logging directory configurable
3 participants