Skip to content
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

Refactor logging #94

Merged
merged 9 commits into from
Apr 22, 2016
Merged

Refactor logging #94

merged 9 commits into from
Apr 22, 2016

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Apr 21, 2016

  • Replaced all console.log statements with log4js log statements
  • Add some debug logging statements
  • Pipe through the test runner output to log.trace method.

@@ -102,6 +104,13 @@ export default class Stryker {
});
}

private freezeConfig() {
freezeRecursively(this.config);
if (log.isDebugEnabled()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check added for performance reasons as you don't want to spend time stringifying the config the user does not even see the log message?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes correct. Its a minor thing but sometimes it might be usefull
Op 22 apr. 2016 08:55 schreef "Simon de Lang" notifications@github.com:

In src/Stryker.ts
#94 (comment):

@@ -102,6 +104,13 @@ export default class Stryker {
});
}

  • private freezeConfig() {
  • freezeRecursively(this.config);
  • if (log.isDebugEnabled()) {

Is this check added for performance reasons as you don't want to spend time
stringifying the config the user does not even see the log message?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/stryker-mutator/stryker/pull/94/files/c6d9d2b7e42d56de0419cc0b75d55379b38047a5#r60697760

@simondel
Copy link
Member

Looks good!

@simondel simondel merged commit 4cc2733 into master Apr 22, 2016
@simondel simondel deleted the refactor-logging branch April 22, 2016 07:24
@simondel simondel mentioned this pull request May 27, 2016
nicojs added a commit that referenced this pull request Jul 30, 2016
* refactor(Stryker.ts) Use log4js in stryker

* refactor(TestRunnerOrchestrator.ts) Use log4js in the test runner orchestrator

* refactor(install-module) Fix for integration test

* refactor(IsolatedTestRunnerAdapter.ts) Use log4js in the isolated test runner adapter

* refactor(Stryker) Add logging for read config

* refactor(TestRunnerOrchestrator) Rename TestRunnerMetadata to TestRunnerSandbox

* refactor(IsolatedTestRunnerAdapter) Add a test before trace logging

* refactor(general) Replace last console.log statements with log4js log statements

* docs(readme) Remove notification about migration to log4js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants