I am using seed
.
I am looking for a simple way to put time stamps into my console logs.
Coming from C and Perl I was looking for something C-like and am using the crate time
version 0.1
I am getting a error client side if I use the code:
fn my_now() -> String {
let tm = time::now()
return format!("{}", tm.rfc3339())
}
The error that is displayed in the browser console makes very little sense to me:
panicked at 'not implemented', /home/patch/.cargo/registry/src/github.com-1285ae84e5963aae/time-0.1.43/src/sys.rs:101:9
Stack:
init/imports.wbg.__wbg_new_55102f737bfb2abd<@http://patchbox.local:8000/pkg/package.js:1104:19
logError/<@http://patchbox.local:8000/pkg/package.js:216:22
console_error_panic_hook::Error::new::h05cac87939647d5e@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[7491]:0x1c1c23
console_error_panic_hook::hook_impl::h62501275fb7ba51c@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[1005]:0xeb454
console_error_panic_hook::hook::h54f80bf17652bb34@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[8398]:0x1ce1b0
core::ops::function::Fn::call::hc18cc83e26219f9c@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[6885]:0x1b86c9
std::panicking::rust_panic_with_hook::h4f753dc70b771d8e@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[1853]:0x1291d4
std::panicking::begin_panic_handler::{{closure}}::h5c9fc29957309ae8@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[3066]:0x15eb96
std::sys_common::backtrace::__rust_end_short_backtrace::h92808941d97e9b21@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[8734]:0x1d232f
rust_begin_unwind@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[7922]:0x1c7dbe
core::panicking::panic_fmt::hbd8a975261a5f466@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[8735]:0x1d2365
core::panicking::panic::h8e74859c8f9988ca@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[6854]:0x1b7efb
time::sys::inner::get_time::h15439e845488feb6@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[9238]:0x1d73bb
time::get_time::hf5d78f4ead104e3b@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[3648]:0x17180d
time::now::h54f7005f6cb6f2f7@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[6853]:0x1b7e8c
frontend::my_now::h39778d3b6ae6393e@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[3006]:0x15c97c
frontend::init::h5cf5c564031b3f87@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[253]:0x62792
core::ops::function::FnOnce::call_once::h786dc48e3ff96cec@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[5625]:0x1a1822
seed::app::App<Ms,Mdl,INodes>::start::h9bf4401e44aed18a@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[210]:0x44b45
frontend::start::hd7996e60b9f1dc0a@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[4222]:0x181560
start@http://patchbox.local:8000/pkg/package_bg.wasm:wasm-function[8494]:0x1cf5da
init@http://patchbox.local:8000/pkg/package.js:1178:10
package.js:1098:21
__wbg_error_761a8766266ddc20 http://patchbox.local:8000/pkg/package.js:1098
logError http://patchbox.local:8000/pkg/package.js:216
hfcb95a9bcab37e44 http://patchbox.local:8000/pkg/package_bg.wasm:1371028
h62501275fb7ba51c http://patchbox.local:8000/pkg/package_bg.wasm:963901
h54f80bf17652bb34 http://patchbox.local:8000/pkg/package_bg.wasm:1892784
hc18cc83e26219f9c http://patchbox.local:8000/pkg/package_bg.wasm:1803977
h4f753dc70b771d8e http://patchbox.local:8000/pkg/package_bg.wasm:1216980
h5c9fc29957309ae8 http://patchbox.local:8000/pkg/package_bg.wasm:1436566
h92808941d97e9b21 http://patchbox.local:8000/pkg/package_bg.wasm:1909551
rust_begin_unwind http://patchbox.local:8000/pkg/package_bg.wasm:1867198
hbd8a975261a5f466 http://patchbox.local:8000/pkg/package_bg.wasm:1909605
h8e74859c8f9988ca http://patchbox.local:8000/pkg/package_bg.wasm:1801979
h15439e845488feb6 http://patchbox.local:8000/pkg/package_bg.wasm:1930171
hf5d78f4ead104e3b http://patchbox.local:8000/pkg/package_bg.wasm:1513485
h54f7005f6cb6f2f7 http://patchbox.local:8000/pkg/package_bg.wasm:1801868
h39778d3b6ae6393e http://patchbox.local:8000/pkg/package_bg.wasm:1427836
h5cf5c564031b3f87 http://patchbox.local:8000/pkg/package_bg.wasm:403346
h786dc48e3ff96cec http://patchbox.local:8000/pkg/package_bg.wasm:1710114
h9bf4401e44aed18a http://patchbox.local:8000/pkg/package_bg.wasm:281413
hd7996e60b9f1dc0a http://patchbox.local:8000/pkg/package_bg.wasm:1578336
start http://patchbox.local:8000/pkg/package_bg.wasm:1897946
init http://patchbox.local:8000/pkg/package.js:1178
Uncaught (in promise) RuntimeError: unreachable executed
init http://patchbox.local:8000/pkg/package.js:1178
package_bg.wasm:1947409:1