Skip to content

Commit

Permalink
fix(logger): change log level to which prefix added (denoland#7582)
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna committed Sep 22, 2020
1 parent cca8856 commit c30c782
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
4 changes: 3 additions & 1 deletion cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,11 @@ pub fn main() {
target.push(':');
target.push_str(&line_no.to_string());
}
if record.level() >= Level::Info {
if record.level() <= Level::Info {
// Print ERROR, WARN, INFO logs as they are
writeln!(buf, "{}", record.args())
} else {
// Add prefix to DEBUG or TRACE logs
writeln!(
buf,
"{} RS - {} - {}",
Expand Down
24 changes: 12 additions & 12 deletions cli/tests/performance_stats.out
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[WILDCARD]
Files: 46
Nodes: [WILDCARD]
Identifiers: [WILDCARD]
Symbols: [WILDCARD]
Types: [WILDCARD]
Instantiations: [WILDCARD]
Parse time: [WILDCARD]
Bind time: [WILDCARD]
Check time: [WILDCARD]
Emit time: [WILDCARD]
Total TS time: [WILDCARD]
Compile time: [WILDCARD]
DEBUG RS - [WILDCARD] - Files: 46
DEBUG RS - [WILDCARD] - Nodes: [WILDCARD]
DEBUG RS - [WILDCARD] - Identifiers: [WILDCARD]
DEBUG RS - [WILDCARD] - Symbols: [WILDCARD]
DEBUG RS - [WILDCARD] - Types: [WILDCARD]
DEBUG RS - [WILDCARD] - Instantiations: [WILDCARD]
DEBUG RS - [WILDCARD] - Parse time: [WILDCARD]
DEBUG RS - [WILDCARD] - Bind time: [WILDCARD]
DEBUG RS - [WILDCARD] - Check time: [WILDCARD]
DEBUG RS - [WILDCARD] - Emit time: [WILDCARD]
DEBUG RS - [WILDCARD] - Total TS time: [WILDCARD]
DEBUG RS - [WILDCARD] - Compile time: [WILDCARD]
[WILDCARD]
4 changes: 2 additions & 2 deletions cli/tests/type_directives_js_main.js.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[WILDCARD]
fetch_source_file specifier: file:[WILDCARD]cli/tests/subdir/type_reference.d.ts [WILDCARD]
[WILDCARD]
DEBUG RS - [WILDCARD] - fetch_source_file specifier: file:[WILDCARD]cli/tests/subdir/type_reference.d.ts [WILDCARD]
[WILDCARD]

0 comments on commit c30c782

Please sign in to comment.