Skip to content

Commit fdba420

Browse files
committed
README and CONTRIBUTING ovehraul.
1 parent 6049542 commit fdba420

File tree

2 files changed

+53
-58
lines changed

2 files changed

+53
-58
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
### Contributing
1+
# Contributing
22

3-
#### Getting started (section in README)
43

5-
Contributions are welcome!
4+
## Overview (mirrored in README)
65

7-
The easiest way for you to contribute right now is to use `fern` in your application, and see where it's lacking. The current library should have a solid base, but not many log adapters or niche features.
6+
There's one thing I need right now, more than anything else: input on what fern does well, and what it should keep
7+
doing well. See [Project Direction](#project-direction).
88

9-
If you have a use case `fern` does not cover, filing an issue will be immensely useful to me, to anyone wanting to contribute to the project, and (hopefully) to you once the feature is implemented!
9+
Besides that, I'm open to PRs! I'll probably review promptly, and I'm always open to being nudged if I don't.
1010

11-
If you've just filed an issue, or you want to approach one of our [existing ones](https://github.com/daboross/fern/issues), mentoring is available! Tag me with @daboross on an issue, or send me an email at daboross @ daboross.net, and I'll be available to help.
11+
For small PRs, I'll mark anything I need changed in a review, and work with you on that.
1212

13-
As a note, all contributions are expected to follow [the Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
13+
For larger PRs, I reserve the right to pull in your commits as they are, then fix things I want to be different myself.
14+
In a workplace, I'd try to never do this - but this is a hobby project for me, and I'd rather be overly particular about
15+
fern's implementation than be reasonable.
1416

15-
#### `fern` project structure
17+
This is a change from my previous policy.
18+
19+
## Code of Conduct.
20+
21+
All interactions are expected to follow [the Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
22+
23+
## `fern` project structure
1624

1725
Fern attempts to be an idiomatic rust library and to maintain a sane structure. All source code is located in `src/`, and tests are in `tests/`.
1826

@@ -24,40 +32,29 @@ The source is split into four modules:
2432

2533
Hopefully these modules are fairly separated, and it's clear when you'll need to work on multiple sections. Adding a new log implementation, for instance, will need to touch `builders.rs` for configuration, and `log_impl.rs` for the implementation - both pieces of code will connect via `builders::Dispatch::into_dispatch`, but besides that, things should be fairly separate.
2634

27-
#### Pull requests
35+
## Pull requests
2836

2937
Pull requests are _the_ way to change code using git. If you aren't familiar with them in general, GitHub has some [excellent documentation](https://help.github.com/articles/about-pull-requests/).
3038

3139
There aren't many hard guidelines in this repository on how specifically to format your request. Main points:
3240

3341
- Please include a descriptive title for your pull request, and elaborate on what's changed in the description.
3442
- Feel free to open a PR before the feature is completely ready, and commit directly to the PR branch.
35-
- This is also great for review of PRs before merging
36-
- All commits will be squashed together on merge, so don't worry about force pushing yourself.
3743
- Please include at least a short description in each commit, and more of one in the "main" feature commit. Doesn't
3844
have to be much, but someone reading the history should easily tell what's different now from before.
39-
- If you have `rustfmt-nightly` installed, using it is recommended. I can also format the code after merging the code,
40-
but formatting it consistently will make reviewing nicer.
41-
42-
### Testing
45+
- Use `cargo fmt` to format your code.
4346

47+
## Testing
4448

45-
Building fern is as easy as is expected, `cargo build`.
46-
47-
As of fern 0.5, testing can also easily be done with `cargo test`.
48-
49-
To run and test the example programs, use:
49+
To run build everything and run all tests, use:
5050

5151
```sh
52-
cargo run --example cmd-program # test less logging
53-
cargo run --example cmd-program -- --verbose # test more logging
54-
cargo run --example colored --features=colored # test colored log levels
52+
cargo build --all-features --all-targets
53+
cargo test --all-features
5554
```
5655

57-
Feel free to add tests and examples demonstrating new features as you see fit. Pull requests which solely add new/interesting example programs are also welcome.
58-
59-
### Mentoring
56+
## Mentoring
6057

61-
With all that said, contributing to a library, especially if new to rust, can be daunting.
58+
Contributing to a project can be daunting.
6259

63-
Feel free to email me at daboross @ daboross.net with any questions!
60+
Email me at daboross @ daboross.net with any questions!

README.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,17 @@ fern
22
====
33
[![crates.io version badge][cratesio-badge]][fern-crate]
44
[![Build Status][test-status-badge]][test-status-link]
5-
[![Average time to resolve an issue][issue-resolution-badge]][isitmaintained-link]
65

7-
Simple, efficient logging for [Rust].
8-
9-
---
10-
11-
## fern 0.4.4, 0.5.\*, 0.6.\* security warning - `colored` feature + global allocator
12-
13-
One of our downstream dependencies, [atty](https://docs.rs/atty/), through
14-
[colored](https://docs.rs/colored/), has an unsoundness issue:
15-
<https://rustsec.org/advisories/RUSTSEC-2021-0145.html>.
16-
17-
This shows up in one situation: if you're using `colored` 0.1.0 (the crate, or our
18-
feature), and a custom global allocator.
19-
20-
Upgrade to `fern` 0.7.0, and `colored` 0.2.0 if you depend on it directly, to fix this issue.
6+
- [documentation][fern-docs]
7+
- [crates.io page][fern-crate]
8+
- [example program][fern-example]
219

22-
---
10+
Simple, efficient logging for [Rust].
2311

24-
Logging configuration is recursively branched, like a fern: formatting, filters, and output can be applied recursively to match increasingly specific kinds of logging. Fern provides a builder-based configuration backing for rust's standard [log] crate.
12+
Logging configuration is recursively branched: formatting, filters, and output can be applied at each
13+
`fern::Dispatch`, applying to increasingly specific kinds of logging.
2514

2615
```rust
27-
//! With fern, we can:
28-
2916
// Configure logger at runtime
3017
fern::Dispatch::new()
3118
// Perform allocation-free log formatting
@@ -49,30 +36,41 @@ fern::Dispatch::new()
4936
.apply()?;
5037

5138
// and log using log crate macros!
52-
info!("hello, world!");
39+
log::info!("hello, world!");
5340
```
5441

5542
Examples of all features at the [api docs][fern-docs]. See fern in use with this [example command line program][fern-example].
5643

57-
---
44+
## Project Direction
5845

59-
- [documentation][fern-docs]
60-
- [crates.io page][fern-crate]
61-
- [example program][fern-example]
46+
I've posted a GitHub Discussion talking about the future of fern: https://github.com/daboross/fern/discussions/147
47+
48+
If you've ever used fern, or you do today, I'd love input!
6249

63-
### Project Status
50+
## fern 0.4.4, 0.5.\*, 0.6.\* security warning - `colored` crate + custom global allocator
6451

65-
The fern project is primarily maintained by myself, @daboross on GitHub. It's a hobby project, but one I aim to keep at a high quality.
52+
One of our downstream dependencies, [atty](https://docs.rs/atty/), through
53+
[colored](https://docs.rs/colored/), has an unsoundness issue:
54+
<https://rustsec.org/advisories/RUSTSEC-2021-0145.html>.
55+
56+
This shows up in one situation: if you're using `colored` 0.1.0 and a custom global allocator.
57+
58+
Upgrade to `fern` 0.7.0 to fix.
6659

6760
### Contributing
6861

69-
As this is a hobby project, contributions are very welcome!
62+
There's one thing I need right now, more than anything else: input on what fern does well, and what it should keep
63+
doing well. See [Project Direction](#project-direction).
64+
65+
Besides that, I'm open to PRs! I'll probably review promptly, and I'm always open to being nudged if I don't.
7066

71-
The easiest way for you to contribute right now is to use fern in your application, and see where it's lacking. The current library has a solid base, but it lacks features, and I may not anticipate your use cases.
67+
For small PRs, I'll mark anything I need changed in a review, and work with you on that.
7268

73-
If you have a use case fern does not cover, please file an issue. This is immensely useful to me, to anyone wanting to contribute to the project, and to you as well if the feature is implemented.
69+
For larger PRs, I reserve the right to pull in your commits as they are, then fix things I want to be different myself.
70+
In a workplace, I'd try to never do this - but this is a hobby project for me, and I'd rather be overly particular about
71+
fern's implementation than be reasonable.
7472

75-
If you're interested in helping fix an [existing issue](https://github.com/daboross/fern/issues), or an issue you just filed, help is appreciated.
73+
This is a change from my previous policy.
7674

7775
See [CONTRIBUTING](./CONTRIBUTING.md) for technical information on contributing.
7876

0 commit comments

Comments
 (0)