aboutsummaryrefslogtreecommitdiff
path: root/azalea
diff options
context:
space:
mode:
authorxtex <xtexchooser@duck.com>2023-06-25 06:43:38 +0800
committerGitHub <noreply@github.com>2023-06-24 17:43:38 -0500
commitea8a8fccb6eb39c97f6cb69e11db5f7d0886172e (patch)
treef8e821275be0aa23608fbd6ae023368ca2a78bcf /azalea
parent5e4699688207b8ac722ae7f96c49428242f49a9d (diff)
downloadazalea-drasl-ea8a8fccb6eb39c97f6cb69e11db5f7d0886172e.tar.xz
Add ClientBuilder:new_without_log (#93)
* Add ClientBuilder:new_without_log * 'log' feature * fix warnings --------- Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea')
-rw-r--r--azalea/Cargo.toml5
-rwxr-xr-xazalea/README.md2
-rw-r--r--azalea/src/lib.rs3
3 files changed, 9 insertions, 1 deletions
diff --git a/azalea/Cargo.toml b/azalea/Cargo.toml
index c03248a7..4e83bdc0 100644
--- a/azalea/Cargo.toml
+++ b/azalea/Cargo.toml
@@ -40,3 +40,8 @@ thiserror = "^1.0.37"
tokio = "^1.24.2"
uuid = "1.2.2"
bevy_log = "0.10.1"
+
+[features]
+default = ["log"]
+# enables bevy_log::LogPlugin by default
+log = ["azalea-client/log"]
diff --git a/azalea/README.md b/azalea/README.md
index e173bdd2..945913d8 100755
--- a/azalea/README.md
+++ b/azalea/README.md
@@ -93,7 +93,7 @@ One of the most useful tools for debugging issues is logging. The default log le
If it's a crash/panic and you believe it has to do with parsing a packet, you might want to set the level to `trace` since that'll make it show the first few hundred bytes of every packet received. This may produce a lot of logs, so pipe it into a file with `&> azalea.log` (on Linux).
-Note: If you get a `SetLoggerError`, it's because you have multiple loggers. Azalea comes with a logger by default, see [`bevy_log`] for more information.
+Note: If you get a `SetLoggerError`, it's because you have multiple loggers. Azalea comes with a logger by default, see [`bevy_log`] for more information. You can disable the default logging plugin by disabling the `log` feature.
## Deadlocks
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index fd735585..ec967708 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -89,6 +89,9 @@ where
/// [`Self::new`] but without adding the plugins by default. This is useful
/// if you want to disable a default plugin.
///
+ /// Note that you can also disable `LogPlugin` by disabling the `log`
+ /// feature.
+ ///
/// You **must** add [`DefaultPlugins`] and [`DefaultBotPlugins`] to this.
///
/// ```