2 unstable releases

0.2.0 Apr 18, 2022
0.1.2 Apr 18, 2022
0.1.1 Apr 18, 2022
0.1.0 Apr 17, 2022

#736 in WebAssembly

MIT/Apache

9KB
125 lines

worker_logger

Logger implementation for Cloudflare Workers. Bridges the log ecosystem to Cloudflare Worker.

Example

Initialize the logger with a string:

worker_logger::init_with_string("info");

Or initialize with a level struct:

use log::Level;
worker_logger::init_with_level(&Level::Debug);

Or with a Cloudflare Worker environment variable:

worker_logger::init_with_env(env, "LOG")?;

Features


lib.rs:

Logger implementation for Cloudflare Workers. Bridges the log ecosystem to Cloudflare Worker.

Example

Initialize the logger with a string:

worker_logger::init_with_string("info");

Or initialize with a level struct:

use log::Level;
worker_logger::init_with_level(&Level::Debug);

Or with a Cloudflare Worker environment variable:

worker_logger::init_with_env(env, "LOG")?;

Features

Dependencies

~16–29MB
~447K SLoC