-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add env_logger (fix #3869) #7142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tokiedokie Nice - thank you! I've been wanting this for a long time.
This branch, using -L=debug
~/src/deno> ./target/debug/deno run -L=debug cli/tests/002_hello.ts
Deno isolate init with snapshots.
rust:shared_queue:reset
DEBUG JS - cwd /Users/rld/src/deno
DEBUG JS - args []
main_module file:///Users/rld/src/deno/cli/tests/002_hello.ts
fetch_source_file specifier: file:///Users/rld/src/deno/cli/tests/002_hello.ts maybe_referrer: None
⚠️️ Granted read access to "/Users/rld/src/deno/cli/tests/002_hello.ts"
compiled filename: "/Users/rld/Library/Caches/deno/gen/file/Users/rld/src/deno/cli/tests/002_hello.ts.js"
register_complete file:///Users/rld/src/deno/cli/tests/002_hello.ts
Hello World
This branch using RUST_LOG in various ways
~/src/deno> RUST_LOG=debug ./target/debug/deno run cli/tests/002_hello.ts
Hello World
~/src/deno> RUST_LOG=1 ./target/debug/deno run cli/tests/002_hello.ts
Hello World
~/src/deno> RUST_LOG=deno ./target/debug/deno run cli/tests/002_hello.ts
Deno isolate init with snapshots.
rust:shared_queue:reset
main_module file:///Users/rld/src/deno/cli/tests/002_hello.ts
fetch_source_file specifier: file:///Users/rld/src/deno/cli/tests/002_hello.ts maybe_referrer: None
⚠️️ Granted read access to "/Users/rld/src/deno/cli/tests/002_hello.ts"
compiled filename: "/Users/rld/Library/Caches/deno/gen/file/Users/rld/src/deno/cli/tests/002_hello.ts.js"
register_complete file:///Users/rld/src/deno/cli/tests/002_hello.ts
Hello World
master branch using -L=debug
~/src/deno> deno run -L=debug cli/tests/002_hello.ts
Deno isolate init with snapshots.
rust:shared_queue:reset
DEBUG JS - cwd /Users/rld/src/deno
DEBUG JS - args []
main_module file:///Users/rld/src/deno/cli/tests/002_hello.ts
fetch_source_file specifier: file:///Users/rld/src/deno/cli/tests/002_hello.ts maybe_referrer: None
⚠️️ Granted read access to "/Users/rld/src/deno/cli/tests/002_hello.ts"
Check file:///Users/rld/src/deno/cli/tests/002_hello.ts
Deno isolate init with snapshots.
rust:shared_queue:reset
DEBUG TS - "sendSync" "op_now"
⚠️️ Granted access to high precision time
DEBUG TS - ">>> compile start" {"rootNames":["file:///Users/rld/src/deno/cli/tests/002_hello.ts"]}
DEBUG TS - "compiler::host.getCompilationSettings()"
DEBUG TS - "compiler::host.getDefaultLibFileName()"
DEBUG TS - "compiler::host.getSourceFile" "file:///Users/rld/src/deno/cli/tests/002_hello.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.deno.window.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.deno.ns.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.esnext.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2020.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2019.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2016.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es5.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.core.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.collection.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.iterable.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.symbol.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.generator.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.promise.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.proxy.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.reflect.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2015.symbol.wellknown.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2016.array.include.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.object.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.sharedmemory.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.string.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.intl.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2017.typedarrays.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.asynciterable.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.asyncgenerator.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.promise.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.regexp.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2018.intl.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2019.array.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2019.object.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2019.string.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2019.symbol.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2020.bigint.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2020.promise.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2020.string.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.es2020.symbol.wellknown.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.esnext.intl.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.esnext.string.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.esnext.promise.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.deno.shared_globals.d.ts"
DEBUG TS - "compiler::host.getSourceFile" "asset:///lib.deno.web.d.ts"
DEBUG TS - "compiler::host.writeFile" "deno://002_hello.js"
DEBUG TS - "compiler::host.writeFile" "cache:///tsbuildinfo.json"
DEBUG TS - "<<< compile end" {"rootNames":["file:///Users/rld/src/deno/cli/tests/002_hello.ts"]}
DEBUG TS - "sendSync" "op_now"
⚠️️ Granted access to high precision time
DEBUG TS - "sendSync" "op_compiler_respond"
DEBUG - Compilation Statistics:
Files: 44
Nodes: 29376
Identifiers: 11501
Symbols: 6543
Types: 84
Instantiations: 2
Parse time: 8
Bind time: 133
Check time: 11
Emit time: 14
Total TS time: 166
Compile time: 184.027165
compiled filename: "/Users/rld/Library/Caches/deno/gen/file/Users/rld/src/deno/cli/tests/002_hello.ts.js"
register_complete file:///Users/rld/src/deno/cli/tests/002_hello.ts
Hello World
Why is the output different?
@ry the difference between master's deno run -L=debug cli/tests/002_hello.ts and this branch's ./target/debug/deno run -L=debug cli/tests/002_hello.ts is caused by the cache master branch
this PR branch
I updated the args of using
using
|
Nice! It would be good to get a test demonstrating the RUST_LOG facility and also to add some documentation (probably to the command-line help) about this feature. |
some tests won't be passed because of #7185 |
@tokiedokie we still want messages like |
@tokiedokie one more thing; while you're working on the logger, could you try to address #6641 as well? |
@bartlomieju thank you for your feedback I will try to find #6641 |
ea2214f
to
61c65f6
Compare
@bartlomieju I confirmed warn logs (#6641) |
@tokiedokie I think that might brake other output after all... Let's skip this issue in this PR. Could you rebase your branch so we can land it? |
3b0f392
to
f1ae2c6
Compare
@bartlomieju @ry Done. Please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you @tokiedokie
#3869
using env_logger for logging