代码拉取完成,页面将自动刷新
2022-04-15 02:09:50 test:7 [T]: This is an example message
print values to console conveniently like this:
val!(v1, v2, v3);
output:
2022-04-21 22:19:59 val_print:26
v1︎︎︎︎⏤►[1, 2, 3]
v2︎︎︎︎⏤►[4, 5, 6]
v3︎︎︎︎⏤►"i am a string"
or all in one line
valn!(v1, v2, v3);
them output:
2022-04-21 22:19:59 val_print:23 v1︎︎︎︎⏤►[1, 2, 3], n︎︎︎︎⏤►3, v2︎︎︎︎⏤►[4, 5, 6]
or with pretty format
valf!(v1);
output:
2022-04-22 22:00:32 val_print:12
pos︎︎︎︎⏤►Position {
x: 3.234,
y: -1.223,
}
use x_log::*;
fn main() {
info!("This is an example message.");
}
or with config
use x_log::*;
fn main() {
// not necessary
x_log::init_once(Some(Options {
level: LevelFilter::Debug,
print_level: true,
timezone: Timezone::Local,
colored: true,
..Default::default()
}));
let v1 = "123";
let v2 = vec![4,5,6];
info!("print some values below.");
val!(v1, v2);
}
If you want to use it in wasm, enable feature wasm
.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。