log_entry() — svelte Function Reference
Architecture documentation for the log_entry() function in tracing.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 70154e87_24eb_dcf5_8315_f0830d757263["log_entry()"] 2696eb67_452f_4c32_3e13_ee172192b366["tracing.js"] 70154e87_24eb_dcf5_8315_f0830d757263 -->|defined in| 2696eb67_452f_4c32_3e13_ee172192b366 62511000_fb03_0d9c_03d6_7b13cd37ac90["trace()"] 62511000_fb03_0d9c_03d6_7b13cd37ac90 -->|calls| 70154e87_24eb_dcf5_8315_f0830d757263 64823018_a0b2_4664_79f3_08e101c9f968["get_type()"] 70154e87_24eb_dcf5_8315_f0830d757263 -->|calls| 64823018_a0b2_4664_79f3_08e101c9f968 532a740d_d410_0fd6_983a_933cb13808e7["snapshot()"] 70154e87_24eb_dcf5_8315_f0830d757263 -->|calls| 532a740d_d410_0fd6_983a_933cb13808e7 style 70154e87_24eb_dcf5_8315_f0830d757263 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/dev/tracing.js lines 21–75
function log_entry(signal, entry) {
const value = signal.v;
if (value === UNINITIALIZED) {
return;
}
const type = get_type(signal);
const current_reaction = /** @type {Reaction} */ (active_reaction);
const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;
const style = dirty
? 'color: CornflowerBlue; font-weight: bold'
: 'color: grey; font-weight: normal';
// eslint-disable-next-line no-console
console.groupCollapsed(
signal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`,
style,
dirty ? 'font-weight: normal' : style,
typeof value === 'object' && value !== null && STATE_SYMBOL in value
? snapshot(value, true)
: value
);
if (type === '$derived') {
const deps = new Set(/** @type {Derived} */ (signal).deps);
for (const dep of deps) {
log_entry(dep);
}
}
if (signal.created) {
// eslint-disable-next-line no-console
console.log(signal.created);
}
if (dirty && signal.updated) {
for (const updated of signal.updated.values()) {
if (updated.error) {
// eslint-disable-next-line no-console
console.log(updated.error);
}
}
}
if (entry) {
for (var trace of entry.traces) {
// eslint-disable-next-line no-console
console.log(trace);
}
}
// eslint-disable-next-line no-console
console.groupEnd();
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does log_entry() do?
log_entry() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dev/tracing.js.
Where is log_entry() defined?
log_entry() is defined in packages/svelte/src/internal/client/dev/tracing.js at line 21.
What does log_entry() call?
log_entry() calls 2 function(s): get_type, snapshot.
What calls log_entry()?
log_entry() is called by 1 function(s): trace.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free