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
* Avoid crashing if azure edition is System.
* Add new Azure-specific options to the prototype and return through the service calls
* Send azure properties over database info request
* IsCloud should include Azure SQL DW
- Fixed references to this feature flag
- Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
Implementation of the resource provider APIs in order to support Create Firewall Rule. Provides definition for a ResourceProvider and Authentication service. The ResourceProvider supports firewall rules for now, and since authentication is routed through that method it will call into the auth service to set up the current account to be used.
Additional notes:
- Fixed deserialization by adding an Accept header. This shouldn't be necessary, but for some reason the firewall rule defaults to XML without this
- Use generic server list and parse the ID to get the resource group, avoiding a large number of extra calls for each RG
- Errors now include error message from the API
* Bump SMO to 140.2.5 to pick-up private XEvent binaries
* Pick up SMO binaries from the build lab
* Add ProfilerService class placeholder
* Update SMO nuget package to include DB Scoped XEvents
* Stage changes
* Stage changes
* Update SMO to use RTM dependencies and remove separate SqlScript package
* Stage changes
* Iterate on profiler service
* Fix post-merge break in localization
* More refactoring
* Continue iterating on profiler
* Add test profiler listener
* Address a couple of the code review feedback
* Fix AppVeyor build break
* Use self-cleaning test file
* code refactoring
* Add filebrowser service and tests
* change dataset reference
* Address pr comments
* add more tests
* address pr comments
* address pr comments and added more tests
* minor change
* minor fix
* Fix test break and add dataset result check
* Initial changes to have serialization generate its own .exe
* Removed additional project from sln file
* remove all references to removed temporary project
* Moved shared contracts into own dll and fixed imports. Addressed PR comments
* Undid having a separate contracts project since that'll be a task for later on. Moved dbcellvalue and saveresultsrequest to Hosting, where they will be imported and shared by the service layer and serialization projects
* Switched backslashes in project reference in csproj file to forward slashes for consistency
* Moved necessary contracts back to service layer. Refactored CommandOptions to reduce code duplication. Addressed miscellaneous PR suggestions
* Accidentally left these files out of previous commit
* Initialized loggers for serialization and credentials with the logging directory provided by the cmd line arg, if there is one
* Changed default log directory paths for serialization and credentials. Removed unnecessary cast and added a copyright
* Changed name of generated executable for serialization service
* removed unnecessary object cast
* removing unnecessary imports and addressing other PR comments
* Allow multiple backups per backup service instance
* Add test to run multiple backups
* Update backup cancelTask method signature
* Fix to have multiple backup instances and add more tests
* Address PR comments
* Remove double new lines
* Add Azure check for backup operations
* Create backup task for execution
* Register backup to task service
* Fix backup task service
* Fix async methods
* Add backup unit test
* Add cancellation token to task service and fix other PR comments
* Add SR and fix other pr comments
* Add comments to methods
* Fixed backup cancel test and casing
* Change sleep time in test