diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-30 11:34:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 15:34:50 +0000 |
commit | 3b69d238cdedc7f47515ba74f2366724679c5c7d (patch) | |
tree | 016643f2551b53270f7af35a69e457ba74f91173 /cli/worker.rs | |
parent | acc6cdc0b1c0fae5e0fba3b0110f96119c2139f7 (diff) |
feat(runtime): add `WorkerLogLevel` (#19316)
This is not really used yet, but provides some infrastructure for doing
more fine grained logging in JS. I will add warn messages in a future
PR.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index 4a41da1a5..6edf427ea 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -37,6 +37,7 @@ use deno_runtime::web_worker::WebWorkerOptions; use deno_runtime::worker::MainWorker; use deno_runtime::worker::WorkerOptions; use deno_runtime::BootstrapOptions; +use deno_runtime::WorkerLogLevel; use deno_semver::npm::NpmPackageReqReference; use crate::args::StorageKeyResolver; @@ -73,7 +74,7 @@ pub trait HasNodeSpecifierChecker: Send + Sync { #[derive(Clone)] pub struct CliMainWorkerOptions { pub argv: Vec<String>, - pub debug: bool, + pub log_level: WorkerLogLevel, pub coverage_dir: Option<String>, pub enable_testing_features: bool, pub has_node_modules_dir: bool, @@ -434,7 +435,7 @@ impl CliMainWorkerFactory { cpu_count: std::thread::available_parallelism() .map(|p| p.get()) .unwrap_or(1), - debug_flag: shared.options.debug, + log_level: shared.options.log_level, enable_testing_features: shared.options.enable_testing_features, locale: deno_core::v8::icu::get_language_tag(), location: shared.options.location.clone(), @@ -562,7 +563,7 @@ fn create_web_worker_callback( cpu_count: std::thread::available_parallelism() .map(|p| p.get()) .unwrap_or(1), - debug_flag: shared.options.debug, + log_level: shared.options.log_level, enable_testing_features: shared.options.enable_testing_features, locale: deno_core::v8::icu::get_language_tag(), location: Some(args.main_module.clone()), |