This change modifies the logging framework within sqltoolservice.
Moves away from custom Logger object to start using .Net tracing framework. It supports for the static Trace and TraceSource way of logging. For all new code it is recommend that we log the log messages using the existing static Logger class, while the code changes will continue to route the older Trace.Write* calls from the process to same log listeners (and thus the log targets) as used by the Logger class. Thus tracing in SMO code that uses Trace.Write* methods gets routed to the same file as the messages from rest of SQLTools Service code.
Make changes to start using .Net Frameworks codebase for all logging to unify our logging story.
Allows parameter to set tracingLevel filters that controls what kinds of message make it to the log file.
Allows a parameter to set a specific log file name so if these gets set by external code (the UI code using the tools service for example) then the external code is aware of the current log file in use.
Adding unittests to test out the existing and improved logging capabilities.
Sequences of checkins in development branch:
* Saving v1 of logging to prepare for code review. Minor cleanup and some end to end testing still remains
* Removing local launchSettings.json files
* added support for lazy listener to sqltoolsloglistener and removed incorrect changes to comments across files in previous checkin
* Converting time to local time when writing entries to the log
* move the hosting.v2 to new .net based logging code
* removing *.dgml files and addding them to .gitignore
* fixing typo of defaultTraceSource
* Addressing pull request feedback
* Adding a test to verify logging from SMO codebase
* propogating changes to v1 sqltools.hosting commandoptions.cs to the v2 version
* Fixing comments on start and stop callstack methods and whitespaces
* Commenting a test that got uncommented by mistake
* addding .gitattributes file as .sql file was observed to be misconstrued as a binary file
* Initial .net core 2.0 conversion
* Convert a few more projects to .net core 2.0
* Convert a few more projects to .net core 2.0
* Fix build.cmd errors
* Add mising nuget package
* Remove dead code
* Add checked in references to workaround nuget package issues
* Update SLN file to refer to correct csproj files
* Rename applications to workaround .net core tooling bug
* Update nuget package with SQL Parser changes
* Add PreserveCompliationContext to avoid MEF bug
* Update smo version to pickup .net core 2 changes
* Pickup latest SMO changes to fix merge break
* Actually pickup correct SMO binaries
* Add support for SLES 12.2
* Fix break running archiving on Linux
* Revert "Add support for SLES 12.2"
This reverts commit 95cdb6d0e35a425be5c0081345d214079cbdc3db.
* Update to latest SMO build
* Install .Net Core 2 during install phase
* Move .Net Core install
* Try to reference dotnet.exe directly
* Fix code coverage script for CSPROJ instead of project.json
* Turn off test that is unreliable in AppVeyor builds.
* Fix appveyor.yml line feed.
* Turn off another flaky test failing in AppVeyor
This is another large code review. I want to make a few more changes, but since these changes will stand on their own, I'll hold back on making this change set any larger than it already is.
Changes in this request:
To address Microsoft/vscode-mssql#326, instead of doing taskkill on the service layer when WaitForExit is executed, we now make an educated guess at which service layer was spawned when the test starts and do a Process.Kill on it when we shut down the test.
All the perf tests have been moved into a new project. This was done to keep them easily separated from code coverage test runs. At the same time the perf tests were separated into separate classes for logical categorization. This process will likely be repeated on the stress tests. The tests can still easily be ran from Visual Studio Test Explorer
To address Microsoft/vscode-mssql#349, a new SelfCleaningFile class was created to allow for easy cleanup of temporary files generated for integration tests via using blocks.
Due to some of the refactoring done while moving the perf tests to a new project, the TestBase class had to be switched to more of a helper class style. As such, all tests that use inherit from TestBase now create a TestBase object on start via a using block. This also simplifies the cleanup at the end of the test.
* Solution for hanging code coverage runs
Code coverage runs would hang in certain scenarios if a test failed before
the service process could be spawned. The taskkill command would fail to
find the service process. The test would then wait for opencover to exit,
but it would not since the service process it had spawned would still be
running, causing the test run to hang indefinitely.
Solution was to capture the service process after it launched and
explicitly kill it when shutting down the test driver.
* Setting the test name in the propery in the class and removign the parameter from each method
* New project for perf tests
* Reworking integration tests to cleanup temp files
* Changes as per @llali review comments
* Adding copyright notices
* Renaming TestBase => TestHelper
* Renaming SelfCleaningFile => SelfCleaningTempFile
* Removing code that sets TestName property
* Fixing compilation error due to removed code