summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-30 11:34:50 -0400
committerGitHub <noreply@github.com>2023-05-30 15:34:50 +0000
commit3b69d238cdedc7f47515ba74f2366724679c5c7d (patch)
tree016643f2551b53270f7af35a69e457ba74f91173 /cli/worker.rs
parentacc6cdc0b1c0fae5e0fba3b0110f96119c2139f7 (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.rs7
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()),