-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move redux logging to a different file #10605
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
Conversation
@@ -120,6 +119,8 @@ function createSendInfoMiddleware(): Redux.Middleware<{}, IStore> { | |||
function createTestLogger() { | |||
const logFileEnv = process.env.VSC_PYTHON_WEBVIEW_LOG_FILE; | |||
if (logFileEnv) { | |||
// tslint:disable-next-line: no-require-imports | |||
const log4js = require('log4js') as typeof import('log4js'); |
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.
This will still get pulled into the final build.
We might want to make log4js
a global like vscode
in release mode build of the UI side of webpack. This way it won't get pulled into release bits.
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.
We might want to make log4js a global like vscode in release mode build of the UI side of webpack.
How do I do that?
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.
Is it this setting in the config?
externals: ['vscode', 'commonjs'],
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.
In webpack, we have a section externals: ['vscode', 'commonjs'..],
This is in the webpack.extension.config.js today.
We can add a similar setting to the webpack.datascience-ui.config.builder.js and if it is a release build (isProdBuild
constant), then array contains ['log4js']
else empty array.
Same way gather
is made an external package when building extension.
Codecov Report
@@ Coverage Diff @@
## master #10605 +/- ##
==========================================
- Coverage 60.79% 60.77% -0.02%
==========================================
Files 579 579
Lines 31412 31412
Branches 4469 4469
==========================================
- Hits 19097 19091 -6
- Misses 11344 11348 +4
- Partials 971 973 +2
Continue to review full report at Codecov.
|
@@ -190,6 +190,7 @@ function buildConfiguration(isNotebook) { | |||
}), | |||
...getPlugins(isNotebook) | |||
], | |||
externals: ['log4js'], |
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.
Ah yes, this will also work, i.e. unconditional.
Kudos, SonarCloud Quality Gate passed!
|
* master: Move redux logging to a different file (#10605) Ensure local host only if connection not available (#10600) Fix a bunch of debugger issues (#10572) Bump acorn from 6.0.0 to 6.4.1 (#10570) Resize plot to fit within pdf page (#10547) Update dev build instructions to mention "python.insidersChannel" Install the ZMQ prebuilt binaries and verify ZMQ works on startup (#10551)
* master: Fix merge issue Move redux logging to a different file (#10605) Disable custom editor API (#10604) Ensure local host only if connection not available (#10600) Delegate management of notebooks (creation and disposing) to I… (#10568) Refactor to accommodate upstream VSCode API changes (#10569) Use a single notebook beetween multiple native editors (#10514) Add support for synchronising edits between two nb editors of… (#10189) Fix tests in ds/custom_editor branch (#10512) Fix linter Reimplement custom editor using new API
Some of the nightly flake tests are failing and I can't repro on my local box. This change will move the logging for the react side into a separate file so I can see only what's happening in the extension.
The other log will still contain time stamps, so it should be possible to correlate it with the main extension log.