ic-logger
A simple logging backend for ICP canisters.
Usage
use ;
async
async
This outputs:
2023-07-27 23:08:09.718590904 UTC: [Canister bkyz2-fmaaa-aaaaa-qaaaq-cai] [WARN my_canister::foo] sample log
You can run the above example with:
As the canister's flexible memory may be dropped, it's suggested to call ic_logger::init() (or equivalent)
in each canister function and drop the result in case the logger was already initialized.
Licence
ic-logger is licenced under the MIT Licence.
Credits
Forked from simple_logger written by Sam Clements.