mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Logging for ga (#698)
Adding a robustness change to call close on logger before process exit. Also adding a designer.cs file needed by a script csproj that got missed out in previous checkin due to .gitignore entry.
This commit is contained in:
@@ -62,6 +62,10 @@ namespace Microsoft.SqlTools.Credentials
|
|||||||
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Logger.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,11 @@ namespace Microsoft.SqlTools.ResourceProvider
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Logger.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
Logger.WriteWithCallstack(TraceEventType.Critical, $"An unhandled exception occurred: {e}");
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Logger.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
189
test/ScriptGenerator/Properties/Resources.Designer.cs
generated
Normal file
189
test/ScriptGenerator/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ScriptGenerator.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ScriptGenerator.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [master]
|
||||||
|
///GO
|
||||||
|
////****** Object: Database [AdventureWorks] Script Date: 9/6/2018 12:11:50 PM ******/
|
||||||
|
///CREATE DATABASE [AdventureWorks]
|
||||||
|
/// CONTAINMENT = NONE
|
||||||
|
/// ON PRIMARY
|
||||||
|
///( NAME = N'AdventureWorks_Data', FILENAME = N'D:\sql\14.0.1000.169\sqlservr\data\AdventureWorks_Data.mdf' , SIZE = 174080KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
|
||||||
|
/// LOG ON
|
||||||
|
///( NAME = N'AdventureWorks_Log', FILENAME = N'D:\sql\14.0.1000.169\sqlservr\data\AdventureWorks_Log.ldf' , SIZE = 18432KB , MAXSIZE = 2048GB , FILEGROWTH = [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AdventureWorks {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AdventureWorks", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [AdventureWorks]
|
||||||
|
///GO
|
||||||
|
///SET ANSI_NULLS OFF
|
||||||
|
///GO
|
||||||
|
///SET QUOTED_IDENTIFIER OFF
|
||||||
|
///GO
|
||||||
|
///
|
||||||
|
///CREATE PROCEDURE [dbo].[AllocatePageInMixedExtent]
|
||||||
|
/// @dbName [dbo].[SinglePartNameType],
|
||||||
|
/// @p [dbo].[Partition],
|
||||||
|
/// @pg [dbo].[PageId]
|
||||||
|
///WITH EXECUTE AS CALLER
|
||||||
|
///AS
|
||||||
|
///EXTERNAL NAME [AMAPI].[SqlTest.Api.OnDiskStructures.Corruptions].[AllocatePageInMixedExtent]
|
||||||
|
///GO
|
||||||
|
////****** Object: StoredProcedure [dbo].[AllocatePageInUniformExtent] Script Date: 9/6/2018 12:11:53 PM ******/
|
||||||
|
///SET ANSI_NULLS OFF
|
||||||
|
///GO
|
||||||
|
///SET QUOTED_IDENTIFIER OFF
|
||||||
|
///GO [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AdventureWorksStoredProceduresCreate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AdventureWorksStoredProceduresCreate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [AdventureWorks]
|
||||||
|
///GO
|
||||||
|
////****** Object: Table [Sales].[Customer] Script Date: 9/6/2018 12:11:50 PM ******/
|
||||||
|
///SET ANSI_NULLS ON
|
||||||
|
///GO
|
||||||
|
///SET QUOTED_IDENTIFIER ON
|
||||||
|
///GO
|
||||||
|
///CREATE TABLE [Sales].[Customer](
|
||||||
|
/// [CustomerID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
|
||||||
|
/// [TerritoryID] [int] NULL,
|
||||||
|
/// [AccountNumber] AS (isnull('AW'+[dbo].[ufnLeadingZeros]([CustomerID]),'')),
|
||||||
|
/// [CustomerType] [nchar](1) NOT NULL,
|
||||||
|
/// [rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
|
||||||
|
/// [ModifiedDate] [datetime] NOT NULL,
|
||||||
|
/// CONSTRAIN [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AdventureWorksTablesCreate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AdventureWorksTablesCreate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [AdventureWorks]
|
||||||
|
///GO
|
||||||
|
///
|
||||||
|
///SET ANSI_NULLS ON
|
||||||
|
///GO
|
||||||
|
///SET QUOTED_IDENTIFIER ON
|
||||||
|
///GO
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///CREATE VIEW [Person].[vAdditionalContactInfo]
|
||||||
|
///AS
|
||||||
|
///SELECT
|
||||||
|
/// [ContactID]
|
||||||
|
/// ,[FirstName]
|
||||||
|
/// ,[MiddleName]
|
||||||
|
/// ,[LastName]
|
||||||
|
/// ,[ContactInfo].ref.value(N'declare namespace ci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo";
|
||||||
|
/// declare namespace act="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes";
|
||||||
|
/// (act:telephoneNumber)[1]/act:number', 'n [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AdventureWorksViewsCreate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AdventureWorksViewsCreate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [master]
|
||||||
|
///GO
|
||||||
|
///Exec sp_configure 'show advanced option', '1'; RECONFIGURE;
|
||||||
|
///go
|
||||||
|
///EXEC sp_configure 'clr strict security', 0; RECONFIGURE;
|
||||||
|
///go
|
||||||
|
///.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TurnOffClrStrictSecurityMode {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TurnOffClrStrictSecurityMode", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to USE [master]
|
||||||
|
///GO
|
||||||
|
///
|
||||||
|
///EXEC sp_configure 'clr strict security', 1; RECONFIGURE;
|
||||||
|
///go
|
||||||
|
///Exec sp_configure 'show advanced option', '0'; RECONFIGURE;
|
||||||
|
///go.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TurnOnClrStrictSecurityMode {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TurnOnClrStrictSecurityMode", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user