Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ddeb44d

Browse files
committed
Add logging on inline comment post error.
1 parent 27ce99a commit ddeb44d

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@
333333
<HintPath>..\..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
334334
<Private>True</Private>
335335
</Reference>
336+
<Reference Include="NLog, Version=3.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
337+
<HintPath>..\..\packages\NLog.3.1.0.0\lib\net45\NLog.dll</HintPath>
338+
<Private>True</Private>
339+
</Reference>
336340
<Reference Include="PresentationCore" />
337341
<Reference Include="PresentationFramework" />
338342
<Reference Include="rothko, Version=0.0.2.0, Culture=neutral, PublicKeyToken=9f664c41f503810a, processorArchitecture=MSIL">

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using GitHub.Primitives;
1010
using GitHub.Services;
1111
using LibGit2Sharp;
12+
using NLog;
1213

1314
namespace GitHub.InlineReviews.Services
1415
{

src/GitHub.InlineReviews/ViewModels/CommentViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using GitHub.Extensions;
88
using GitHub.Models;
99
using GitHub.UI;
10+
using NLog;
1011
using Octokit;
1112
using ReactiveUI;
1213

@@ -17,6 +18,7 @@ namespace GitHub.InlineReviews.ViewModels
1718
/// </summary>
1819
public class CommentViewModel : ReactiveObject, ICommentViewModel
1920
{
21+
static readonly Logger log = LogManager.GetCurrentClassLogger();
2022
string body;
2123
string errorMessage;
2224
bool isReadOnly;
@@ -167,6 +169,7 @@ async Task DoCommitEdit(object unused)
167169
}
168170

169171
ErrorMessage = message;
172+
log.Error("Error posting inline comment.", e);
170173
}
171174
}
172175

src/GitHub.InlineReviews/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net452" />
3131
<package id="Microsoft.VisualStudio.Validation" version="14.1.111" targetFramework="net452" />
3232
<package id="Microsoft.VSSDK.BuildTools" version="14.3.25407" targetFramework="net452" developmentDependency="true" />
33+
<package id="NLog" version="3.1.0.0" targetFramework="net461" />
3334
<package id="Rothko" version="0.0.2-ghfvs" targetFramework="net461" />
3435
<package id="Rx-Core" version="2.2.5-custom" targetFramework="net461" />
3536
<package id="Rx-Interfaces" version="2.2.5-custom" targetFramework="net461" />

0 commit comments

Comments
 (0)