Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_log/src/once.rs
6595 views
1
/// Call [`trace!`](crate::trace) once per call site.
2
///
3
/// Useful for logging within systems which are called every frame.
4
#[macro_export]
5
macro_rules! trace_once {
6
($($arg:tt)+) => ({
7
$crate::once!($crate::trace!($($arg)+))
8
});
9
}
10
11
/// Call [`debug!`](crate::debug) once per call site.
12
///
13
/// Useful for logging within systems which are called every frame.
14
#[macro_export]
15
macro_rules! debug_once {
16
($($arg:tt)+) => ({
17
$crate::once!($crate::debug!($($arg)+))
18
});
19
}
20
21
/// Call [`info!`](crate::info) once per call site.
22
///
23
/// Useful for logging within systems which are called every frame.
24
#[macro_export]
25
macro_rules! info_once {
26
($($arg:tt)+) => ({
27
$crate::once!($crate::info!($($arg)+))
28
});
29
}
30
31
/// Call [`warn!`](crate::warn) once per call site.
32
///
33
/// Useful for logging within systems which are called every frame.
34
#[macro_export]
35
macro_rules! warn_once {
36
($($arg:tt)+) => ({
37
$crate::once!($crate::warn!($($arg)+))
38
});
39
}
40
41
/// Call [`error!`](crate::error) once per call site.
42
///
43
/// Useful for logging within systems which are called every frame.
44
#[macro_export]
45
macro_rules! error_once {
46
($($arg:tt)+) => ({
47
$crate::once!($crate::error!($($arg)+))
48
});
49
}
50
51