Skip to content

Commit 66da351

Browse files
committed
stringbuilder was unnecessary and newline missing.
1 parent ba535e0 commit 66da351

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

active-directory-b2c-wpf/App.xaml.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
using System;
45
using System.IO;
56
using System.Text;
67
using System.Windows;
@@ -40,13 +41,11 @@ static App()
4041

4142
TokenCacheHelper.Bind(PublicClientApp.UserTokenCache);
4243
}
44+
4345
private static void Log(LogLevel level, string message, bool containsPii)
4446
{
45-
string logs = ($"{level} {message}");
46-
StringBuilder sb = new StringBuilder();
47-
sb.Append(logs);
48-
File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalLogs.txt", sb.ToString());
49-
sb.Clear();
47+
string logs = $"{level} {message}{Environment.NewLine}";
48+
File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalLogs.txt", logs);
5049
}
5150
}
5251
}

0 commit comments

Comments
 (0)