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

Avoid the need to pass &Logger internally everywhere #425

Closed
alexcrichton opened this issue Nov 2, 2018 · 1 comment
Closed

Avoid the need to pass &Logger internally everywhere #425

alexcrichton opened this issue Nov 2, 2018 · 1 comment
Labels
enhancement New feature or request PR attached there's a PR open for this issue

Comments

@alexcrichton
Copy link
Contributor

I've noticed when working on wasm-pack that &Logger from slog is passed around in a lot of locations. This unfortunately makes refactoring painful, however, and is otherwise somewhat unergonomic to pass in so man locations.

Perhaps the log crate or some other solution could be used where we still get to log everything but &Logger doesn't have to be passed as an argument?

@fitzgen
Copy link
Member

fitzgen commented Nov 5, 2018

I would be in favor of this since we aren't even using structured logging, just plain old unstructured messages.

alexcrichton added a commit to alexcrichton/wasm-pack that referenced this issue Nov 5, 2018
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes rustwasm#425
alexcrichton added a commit to alexcrichton/wasm-pack that referenced this issue Nov 5, 2018
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes rustwasm#425
alexcrichton added a commit to alexcrichton/wasm-pack that referenced this issue Nov 5, 2018
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes rustwasm#425
alexcrichton added a commit to alexcrichton/wasm-pack that referenced this issue Nov 7, 2018
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes rustwasm#425
@ashleygwilliams ashleygwilliams added the enhancement New feature or request label Dec 18, 2018
@ashleygwilliams ashleygwilliams added the PR attached there's a PR open for this issue label Dec 27, 2018
alexcrichton added a commit to alexcrichton/wasm-pack that referenced this issue Jan 10, 2019
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes rustwasm#425
ashleygwilliams pushed a commit that referenced this issue Jan 15, 2019
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes #425
ashleygwilliams pushed a commit that referenced this issue Feb 27, 2019
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes #425
ashleygwilliams pushed a commit that referenced this issue Feb 27, 2019
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.

Closes #425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR attached there's a PR open for this issue
Projects
None yet
Development

No branches or pull requests

3 participants