Skip to content

Commit e27caff

Browse files
committed
Remove logger interface, remove log file sharing
1 parent 2ce6b9c commit e27caff

File tree

69 files changed

+322
-319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+322
-319
lines changed

Third Party Notices.txt

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,58 @@ Unless required by applicable law or agreed to in writing, software
3131
distributed under the License is distributed on an "AS IS" BASIS,
3232
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3333
See the License for the specific language governing permissions and
34-
limitations under the License.
34+
limitations under the License.
35+
36+
---
37+
38+
Serilog.Sinks.Async
39+
40+
Copyright 2013-2015 Serilog Contributors
41+
42+
Licensed under the Apache License, Version 2.0 (the "License");
43+
you may not use this file except in compliance with the License.
44+
You may obtain a copy of the License at
45+
46+
http://www.apache.org/licenses/LICENSE-2.0
47+
48+
Unless required by applicable law or agreed to in writing, software
49+
distributed under the License is distributed on an "AS IS" BASIS,
50+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+
See the License for the specific language governing permissions and
52+
limitations under the License.
53+
54+
---
55+
56+
Serilog.Sinks.File
57+
58+
Copyright 2013-2015 Serilog Contributors
59+
60+
Licensed under the Apache License, Version 2.0 (the "License");
61+
you may not use this file except in compliance with the License.
62+
You may obtain a copy of the License at
63+
64+
http://www.apache.org/licenses/LICENSE-2.0
65+
66+
Unless required by applicable law or agreed to in writing, software
67+
distributed under the License is distributed on an "AS IS" BASIS,
68+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69+
See the License for the specific language governing permissions and
70+
limitations under the License.
71+
72+
---
73+
74+
Serilog.Sinks.Console
75+
76+
Copyright 2013-2015 Serilog Contributors
77+
78+
Licensed under the Apache License, Version 2.0 (the "License");
79+
you may not use this file except in compliance with the License.
80+
You may obtain a copy of the License at
81+
82+
http://www.apache.org/licenses/LICENSE-2.0
83+
84+
Unless required by applicable law or agreed to in writing, software
85+
distributed under the License is distributed on an "AS IS" BASIS,
86+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
87+
See the License for the specific language governing permissions and
88+
limitations under the License.

src/PowerShellEditorServices.Host/CodeLens/CodeLensFeature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal class CodeLensFeature :
3030
public CodeLensFeature(
3131
EditorSession editorSession,
3232
IMessageHandlers messageHandlers,
33-
IPsesLogger logger)
33+
PsesLogger logger)
3434
: base(logger)
3535
{
3636
this.editorSession = editorSession;
@@ -52,7 +52,7 @@ public static CodeLensFeature Create(
5252
new CodeLensFeature(
5353
editorSession,
5454
components.Get<IMessageHandlers>(),
55-
components.Get<IPsesLogger>());
55+
components.Get<PsesLogger>());
5656

5757
codeLenses.Providers.Add(
5858
new ReferencesCodeLensProvider(

src/PowerShellEditorServices.Host/EditorServicesHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class EditorServicesHost
6464
private HashSet<string> featureFlags;
6565
private HostDetails hostDetails;
6666
private LanguageServer languageServer;
67-
private IPsesLogger logger;
67+
private PsesLogger logger;
6868
private ProfilePaths profilePaths;
6969
private TaskCompletionSource<bool> serverCompletedTask;
7070

src/PowerShellEditorServices.Host/PSHost/PromptHandlers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public ProtocolChoicePromptHandler(
2424
IMessageSender messageSender,
2525
IHostInput hostInput,
2626
IHostOutput hostOutput,
27-
IPsesLogger logger)
27+
PsesLogger logger)
2828
: base(hostOutput, logger)
2929
{
3030
this.hostInput = hostInput;
@@ -107,7 +107,7 @@ public ProtocolInputPromptHandler(
107107
IMessageSender messageSender,
108108
IHostInput hostInput,
109109
IHostOutput hostOutput,
110-
IPsesLogger logger)
110+
PsesLogger logger)
111111
: base(hostOutput, logger)
112112
{
113113
this.hostInput = hostInput;

src/PowerShellEditorServices.Host/PSHost/ProtocolPSHostUserInterface.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal class ProtocolPSHostUserInterface : EditorServicesPSHostUserInterface
3333
public ProtocolPSHostUserInterface(
3434
PowerShellContext powerShellContext,
3535
IMessageSender messageSender,
36-
IPsesLogger logger)
36+
PsesLogger logger)
3737
: base(powerShellContext, new SimplePSHostRawUserInterface(logger), logger)
3838
{
3939
this.messageSender = messageSender;

src/PowerShellEditorServices.Host/Symbols/DocumentSymbolFeature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal class DocumentSymbolFeature :
2626
public DocumentSymbolFeature(
2727
EditorSession editorSession,
2828
IMessageHandlers messageHandlers,
29-
IPsesLogger logger)
29+
PsesLogger logger)
3030
: base(logger)
3131
{
3232
this.editorSession = editorSession;
@@ -44,7 +44,7 @@ public static DocumentSymbolFeature Create(
4444
new DocumentSymbolFeature(
4545
editorSession,
4646
components.Get<IMessageHandlers>(),
47-
components.Get<IPsesLogger>());
47+
components.Get<PsesLogger>());
4848

4949
documentSymbols.Providers.Add(
5050
new ScriptDocumentSymbolProvider(

src/PowerShellEditorServices.Protocol/Client/DebugAdapterClientBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Client
1414
{
1515
public class DebugAdapterClient : IMessageSender, IMessageHandlers
1616
{
17-
private IPsesLogger logger;
17+
private PsesLogger logger;
1818
private ProtocolEndpoint protocolEndpoint;
1919
private MessageDispatcher messageDispatcher;
2020

21-
public DebugAdapterClient(ChannelBase clientChannel, IPsesLogger logger)
21+
public DebugAdapterClient(ChannelBase clientChannel, PsesLogger logger)
2222
{
2323
this.logger = logger;
2424
this.messageDispatcher = new MessageDispatcher(logger);

src/PowerShellEditorServices.Protocol/Client/LanguageClientBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Client
1717
/// </summary>
1818
public abstract class LanguageClientBase : IMessageHandlers, IMessageSender
1919
{
20-
IPsesLogger logger;
20+
PsesLogger logger;
2121
private ProtocolEndpoint protocolEndpoint;
2222
private MessageDispatcher messageDispatcher;
2323

@@ -26,7 +26,7 @@ public abstract class LanguageClientBase : IMessageHandlers, IMessageSender
2626
/// specified channel for communication.
2727
/// </summary>
2828
/// <param name="clientChannel">The channel to use for communication with the server.</param>
29-
public LanguageClientBase(ChannelBase clientChannel, IPsesLogger logger)
29+
public LanguageClientBase(ChannelBase clientChannel, PsesLogger logger)
3030
{
3131
this.logger = logger;
3232
this.messageDispatcher = new MessageDispatcher(logger);

src/PowerShellEditorServices.Protocol/Client/LanguageServiceClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class LanguageServiceClient : LanguageClientBase
1919
private Dictionary<string, ScriptFileMarker[]> cachedDiagnostics =
2020
new Dictionary<string, ScriptFileMarker[]>();
2121

22-
public LanguageServiceClient(ChannelBase clientChannel, IPsesLogger logger)
22+
public LanguageServiceClient(ChannelBase clientChannel, PsesLogger logger)
2323
: base(clientChannel, logger)
2424
{
2525
}

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeClientChannel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1212
{
1313
public class NamedPipeClientChannel : ChannelBase
1414
{
15-
private IPsesLogger logger;
15+
private PsesLogger logger;
1616
private NamedPipeClientStream pipeClient;
1717

1818
public NamedPipeClientChannel(
1919
NamedPipeClientStream pipeClient,
20-
IPsesLogger logger)
20+
PsesLogger logger)
2121
{
2222
this.pipeClient = pipeClient;
2323
this.logger = logger;
@@ -49,7 +49,7 @@ protected override void Shutdown()
4949
public static async Task<NamedPipeClientChannel> Connect(
5050
string pipeName,
5151
MessageProtocolType messageProtocolType,
52-
IPsesLogger logger)
52+
PsesLogger logger)
5353
{
5454
var pipeClient =
5555
new NamedPipeClientStream(

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1010
{
1111
public class NamedPipeServerChannel : ChannelBase
1212
{
13-
private IPsesLogger logger;
13+
private PsesLogger logger;
1414
private NamedPipeServerStream pipeServer;
1515

1616
public NamedPipeServerChannel(
1717
NamedPipeServerStream pipeServer,
18-
IPsesLogger logger)
18+
PsesLogger logger)
1919
{
2020
this.pipeServer = pipeServer;
2121
this.logger = logger;

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1313
{
1414
public class NamedPipeServerListener : ServerListenerBase<NamedPipeServerChannel>
1515
{
16-
private IPsesLogger logger;
16+
private PsesLogger logger;
1717
private string pipeName;
1818
private NamedPipeServerStream pipeServer;
1919

2020
public NamedPipeServerListener(
2121
MessageProtocolType messageProtocolType,
2222
string pipeName,
23-
IPsesLogger logger)
23+
PsesLogger logger)
2424
: base(messageProtocolType)
2525
{
2626
this.logger = logger;

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/StdioClientChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class StdioClientChannel : ChannelBase
2020
private string serviceProcessPath;
2121
private string serviceProcessArguments;
2222

23-
private IPsesLogger logger;
23+
private PsesLogger logger;
2424
private Stream inputStream;
2525
private Stream outputStream;
2626
private Process serviceProcess;
@@ -37,7 +37,7 @@ public class StdioClientChannel : ChannelBase
3737
/// <param name="serverProcessArguments">Optional arguments to pass to the service process executable.</param>
3838
public StdioClientChannel(
3939
string serverProcessPath,
40-
IPsesLogger logger,
40+
PsesLogger logger,
4141
params string[] serverProcessArguments)
4242
{
4343
this.logger = logger;

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/StdioServerChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1616
/// </summary>
1717
public class StdioServerChannel : ChannelBase
1818
{
19-
private IPsesLogger logger;
19+
private PsesLogger logger;
2020
private Stream inputStream;
2121
private Stream outputStream;
2222

23-
public StdioServerChannel(IPsesLogger logger)
23+
public StdioServerChannel(PsesLogger logger)
2424
{
2525
this.logger = logger;
2626
}

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/StdioServerListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1010
{
1111
public class StdioServerListener : ServerListenerBase<StdioServerChannel>
1212
{
13-
private IPsesLogger logger;
13+
private PsesLogger logger;
1414

1515
public StdioServerListener(
1616
MessageProtocolType messageProtocolType,
17-
IPsesLogger logger)
17+
PsesLogger logger)
1818
: base(messageProtocolType)
1919
{
2020
this.logger = logger;

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/TcpSocketClientChannel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1212
{
1313
public class TcpSocketClientChannel : ChannelBase
1414
{
15-
private IPsesLogger logger;
15+
private PsesLogger logger;
1616
private NetworkStream networkStream;
1717

1818
public TcpSocketClientChannel(
1919
TcpClient tcpClient,
20-
IPsesLogger logger)
20+
PsesLogger logger)
2121
{
2222
this.networkStream = tcpClient.GetStream();
2323
this.logger = logger;
@@ -50,7 +50,7 @@ protected override void Shutdown()
5050
public static async Task<TcpSocketClientChannel> Connect(
5151
int portNumber,
5252
MessageProtocolType messageProtocolType,
53-
IPsesLogger logger)
53+
PsesLogger logger)
5454
{
5555
TcpClient tcpClient = new TcpClient();
5656
await tcpClient.ConnectAsync(IPAddress.Loopback, portNumber);

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/TcpSocketServerChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1212
{
1313
public class TcpSocketServerChannel : ChannelBase
1414
{
15-
private IPsesLogger logger;
15+
private PsesLogger logger;
1616
private TcpClient tcpClient;
1717
private NetworkStream networkStream;
1818

19-
public TcpSocketServerChannel(TcpClient tcpClient, IPsesLogger logger)
19+
public TcpSocketServerChannel(TcpClient tcpClient, PsesLogger logger)
2020
{
2121
this.tcpClient = tcpClient;
2222
this.networkStream = this.tcpClient.GetStream();

src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/TcpSocketServerListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
1313
{
1414
public class TcpSocketServerListener : ServerListenerBase<TcpSocketServerChannel>
1515
{
16-
private IPsesLogger logger;
16+
private PsesLogger logger;
1717
private int portNumber;
1818
private TcpListener tcpListener;
1919

2020
public TcpSocketServerListener(
2121
MessageProtocolType messageProtocolType,
2222
int portNumber,
23-
IPsesLogger logger)
23+
PsesLogger logger)
2424
: base(messageProtocolType)
2525
{
2626
this.portNumber = portNumber;

src/PowerShellEditorServices.Protocol/MessageProtocol/MessageDispatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class MessageDispatcher : IMessageHandlers, IMessageDispatcher
1717
{
1818
#region Fields
1919

20-
private IPsesLogger logger;
20+
private PsesLogger logger;
2121

2222
private Dictionary<string, Func<Message, MessageWriter, Task>> requestHandlers =
2323
new Dictionary<string, Func<Message, MessageWriter, Task>>();
@@ -29,7 +29,7 @@ public class MessageDispatcher : IMessageHandlers, IMessageDispatcher
2929

3030
#region Constructors
3131

32-
public MessageDispatcher(IPsesLogger logger)
32+
public MessageDispatcher(PsesLogger logger)
3333
{
3434
this.logger = logger;
3535
}

src/PowerShellEditorServices.Protocol/MessageProtocol/MessageReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class MessageReader
2525
private const int LF = 0x0A;
2626
private static string[] NewLineDelimiters = new string[] { Environment.NewLine };
2727

28-
private IPsesLogger logger;
28+
private PsesLogger logger;
2929
private Stream inputStream;
3030
private IMessageSerializer messageSerializer;
3131
private Encoding messageEncoding;
@@ -52,7 +52,7 @@ enum ReadState
5252
public MessageReader(
5353
Stream inputStream,
5454
IMessageSerializer messageSerializer,
55-
IPsesLogger logger,
55+
PsesLogger logger,
5656
Encoding messageEncoding = null)
5757
{
5858
Validate.IsNotNull("streamReader", inputStream);

src/PowerShellEditorServices.Protocol/MessageProtocol/MessageWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class MessageWriter
1717
{
1818
#region Private Fields
1919

20-
private IPsesLogger logger;
20+
private PsesLogger logger;
2121
private Stream outputStream;
2222
private IMessageSerializer messageSerializer;
2323
private AsyncLock writeLock = new AsyncLock();
@@ -33,7 +33,7 @@ public class MessageWriter
3333
public MessageWriter(
3434
Stream outputStream,
3535
IMessageSerializer messageSerializer,
36-
IPsesLogger logger)
36+
PsesLogger logger)
3737
{
3838
Validate.IsNotNull("streamWriter", outputStream);
3939
Validate.IsNotNull("messageSerializer", messageSerializer);

0 commit comments

Comments
 (0)