summaryrefslogtreecommitdiff
path: root/cli/cache
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-11-23 13:34:44 -0500
committerGitHub <noreply@github.com>2022-11-23 13:34:44 -0500
commitbeaa0d88679c96e643f411d04a4ce9f6d159eaeb (patch)
tree3eae69a47f984cd8c19860758feb969a74b26bb7 /cli/cache
parentcbf4fa143fe0e21647ca9518ec93c349199da8f4 (diff)
chore: more debug logging and avoid allocating strings in ts logging when not debug (#16689)
Diffstat (limited to 'cli/cache')
-rw-r--r--cli/cache/check.rs1
-rw-r--r--cli/cache/incremental.rs1
-rw-r--r--cli/cache/node.rs1
-rw-r--r--cli/cache/parsed_source.rs1
4 files changed, 4 insertions, 0 deletions
diff --git a/cli/cache/check.rs b/cli/cache/check.rs
index 6f3c41950..51adea9a1 100644
--- a/cli/cache/check.rs
+++ b/cli/cache/check.rs
@@ -17,6 +17,7 @@ pub struct TypeCheckCache(Option<Connection>);
impl TypeCheckCache {
pub fn new(db_file_path: &Path) -> Self {
+ log::debug!("Loading type check cache.");
match Self::try_new(db_file_path) {
Ok(cache) => cache,
Err(err) => {
diff --git a/cli/cache/incremental.rs b/cli/cache/incremental.rs
index da832a8b5..b5c8180c3 100644
--- a/cli/cache/incremental.rs
+++ b/cli/cache/incremental.rs
@@ -164,6 +164,7 @@ struct SqlIncrementalCache {
impl SqlIncrementalCache {
pub fn new(db_file_path: &Path, state_hash: u64) -> Result<Self, AnyError> {
+ log::debug!("Loading incremental cache.");
let conn = Connection::open(db_file_path)?;
Self::from_connection(conn, state_hash, crate::version::deno())
}
diff --git a/cli/cache/node.rs b/cli/cache/node.rs
index 62a8a8926..d84a25c34 100644
--- a/cli/cache/node.rs
+++ b/cli/cache/node.rs
@@ -142,6 +142,7 @@ impl NodeAnalysisCacheInner {
db_file_path: Option<&Path>,
version: String,
) -> Result<Self, AnyError> {
+ log::debug!("Opening node analysis cache.");
let conn = match db_file_path {
Some(path) => Connection::open(path)?,
None => Connection::open_in_memory()?,
diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs
index 0c9fe5c97..9ab926874 100644
--- a/cli/cache/parsed_source.rs
+++ b/cli/cache/parsed_source.rs
@@ -143,6 +143,7 @@ impl ParsedSourceCacheModuleAnalyzer {
cli_version: String,
sources: ParsedSourceCacheSources,
) -> Result<Self, AnyError> {
+ log::debug!("Loading cached module analyzer.");
let conn = match db_file_path {
Some(path) => Connection::open(path)?,
None => Connection::open_in_memory()?,