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

Change references of env_logger to tracing-subscriber #329

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 97 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ version = "0.12.4"
# For the examples
tokio = { version = "1.25.1", features = ["rt-multi-thread"] }
futures = { version = "0.3.13", default-features = false }
env_logger = "0.10.1"
tracing-subscriber = "0.3.18"
fluent = "0.16.0"
intl-memoizer = "0.5.1"
fluent-syntax = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_structure/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async fn on_error(error: poise::FrameworkError<'_, Data, Error>) {

#[tokio::main]
async fn main() {
env_logger::init();
tracing_subscriber::fmt::init();

// FrameworkOptions contains all of poise's configuration option in one struct
// Every option can be omitted to use its default value
Expand Down
2 changes: 1 addition & 1 deletion examples/event_handler/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Data {

#[tokio::main]
async fn main() {
env_logger::init();
tracing_subscriber::fmt::init();

let token = var("DISCORD_TOKEN")
.expect("Missing `DISCORD_TOKEN` env var, see README for more information.");
Expand Down
2 changes: 1 addition & 1 deletion examples/feature_showcase/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Data {}

#[tokio::main]
async fn main() {
env_logger::init();
tracing_subscriber::fmt::init();

let framework = poise::Framework::builder()
.options(poise::FrameworkOptions {
Expand Down
2 changes: 1 addition & 1 deletion examples/fluent_localization/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn register(ctx: Context<'_>) -> Result<(), Error> {

#[tokio::main]
async fn main() {
env_logger::init();
tracing_subscriber::fmt::init();

let mut commands = vec![welcome(), info(), register()];
let translations = translation::read_ftl().expect("failed to read translation files");
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub use paginate::*;
use crate::{serenity::CreateAllowedMentions, serenity_prelude as serenity, CreateReply};

/// An error handler that logs errors either via the [`tracing`] crate or via a Discord message. Set
/// up a logger (e.g. `env_logger::init()`) or a tracing subscriber
/// up a logger like tracing subscriber
/// (e.g. `tracing_subscriber::fmt::init()`) to see the logged errors from this method.
///
/// If the user invoked the command wrong ([`crate::FrameworkError::ArgumentParse`]), the command
Expand Down
Loading