Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Sep 11, 2023
1 parent 0a35fd5 commit 54ce43a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/bevy_asset/src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
LoadDirectError, MissingAssetLoaderForExtensionError, CANNOT_WATCH_ERROR_MESSAGE,
};
use bevy_ecs::prelude::*;
use bevy_log::{debug, error, trace, warn};
use bevy_log::{debug, error, info, trace, warn};
use bevy_tasks::IoTaskPool;
use bevy_utils::{BoxedFuture, HashMap, HashSet};
use futures_io::ErrorKind;
Expand Down Expand Up @@ -218,7 +218,7 @@ impl AssetProcessor {
}

async fn handle_asset_source_event(&self, event: AssetSourceEvent) {
trace!("{event:?}");
info!("{event:?}");
match event {
AssetSourceEvent::AddedAsset(path)
| AssetSourceEvent::AddedMeta(path)
Expand Down Expand Up @@ -625,6 +625,7 @@ impl AssetProcessor {
///
/// [`LoadContext`]: crate::loader::LoadContext
async fn process_asset(&self, path: &Path) {
info!("processing {:?}", path);
let result = self.process_asset_internal(path).await;
let mut infos = self.data.asset_infos.write().await;
let asset_path = AssetPath::from_path(path.to_owned());
Expand Down
3 changes: 3 additions & 0 deletions examples/asset/processing/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl AssetLoader for TextLoader {
settings: &'a TextSettings,
_load_context: &'a mut LoadContext,
) -> BoxedFuture<'a, Result<Text, anyhow::Error>> {
println!("TextLoader::load");
Box::pin(async move {
let mut bytes = Vec::new();
reader.read_to_end(&mut bytes).await?;
Expand Down Expand Up @@ -139,6 +140,8 @@ impl AssetLoader for CoolTextLoader {
_settings: &'a Self::Settings,
load_context: &'a mut LoadContext,
) -> BoxedFuture<'a, Result<CoolText, anyhow::Error>> {
println!("CoolTextLoader::load");

Box::pin(async move {
let mut bytes = Vec::new();
reader.read_to_end(&mut bytes).await?;
Expand Down

0 comments on commit 54ce43a

Please sign in to comment.