Skip to content

Commit addcc7c

Browse files
committed
#7 > remove username and machinename from report
1 parent 3a66c26 commit addcc7c

File tree

7 files changed

+5
-22
lines changed

7 files changed

+5
-22
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ Operating System
113113
--Version = 6.1.7600
114114
115115
[Machine]
116-
-PANDAMAN
117116
--Manufacturer = Gigabyte Technology Co., Ltd.
118117
--Model = P35-DS3L
119118
--TotalPhysicalMemory = 3756515328
120-
--UserName = MachineName\GruberMachine
121119
```

src/ExceptionReporter/Core/ExceptionReportBuilder.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ void BuildGeneralInfo()
4646
.AppendLine("Application: " + _reportInfo.AppName)
4747
.AppendLine("Version: " + _reportInfo.AppVersion)
4848
.AppendLine("Region: " + _reportInfo.RegionInfo)
49-
.AppendLine("Machine: " + _reportInfo.MachineName)
50-
.AppendLine("User: " + _reportInfo.UserName)
49+
5150
.AppendLine("Date: " + _reportInfo.ExceptionDate.ToShortDateString())
5251
.AppendLine("Time: " + _reportInfo.ExceptionDate.ToShortTimeString())
5352
.AppendLine();
5453

5554
_stringBuilder.AppendLine("User Explanation:")
5655
.AppendLine()
57-
.AppendFormat("{0} said \"{1}\"", _reportInfo.UserName, _reportInfo.UserExplanation)
56+
.AppendFormat("User said \"{0}\"", _reportInfo.UserExplanation)
5857
.AppendLine().AppendDottedLine().AppendLine();
5958
}
6059

src/ExceptionReporter/Core/ExceptionReportGenerator.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public ExceptionReportGenerator(ExceptionReportInfo reportInfo)
2828
_reportInfo = reportInfo ?? throw new ExceptionReportGeneratorException("reportInfo cannot be null");
2929

3030
_reportInfo.ExceptionDate = DateTime.UtcNow;
31-
_reportInfo.UserName = Environment.UserName;
32-
_reportInfo.MachineName = Environment.MachineName;
3331
_reportInfo.RegionInfo = Application.CurrentCulture.DisplayName;
3432

3533
_reportInfo.AppName = string.IsNullOrEmpty(_reportInfo.AppName) ? Application.ProductName : _reportInfo.AppName;
@@ -88,7 +86,7 @@ static IEnumerable<SysInfoResult> CreateSysInfoResults()
8886
retriever.Retrieve(SysInfoQueries.Machine).Filter(
8987
new[]
9088
{
91-
"Machine", "UserName", "TotalPhysicalMemory", "Manufacturer", "Model"
89+
"TotalPhysicalMemory", "Manufacturer", "Model"
9290
}),
9391
};
9492
return results;

src/ExceptionReporter/Core/ExceptionReportInfo.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,6 @@ public void SetExceptions(IEnumerable<Exception> exceptions)
7676
/// </summary>
7777
public string RegionInfo { get; set; }
7878

79-
/// <summary>
80-
/// The name of the running application's machine/>
81-
/// </summary>
82-
public string MachineName { get; set; }
83-
84-
/// <summary>
85-
/// The name of the running application's current user. Defaults to <see cref="Environment.UserName"/>
86-
/// </summary>
87-
public string UserName { get; set; }
88-
8979
/// <summary>
9080
/// Date/time of the exception being raised
9181
/// </summary>

src/ExceptionReporter/ExceptionReporter.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<OldToolsVersion>3.5</OldToolsVersion>
2020
<UpgradeBackupLocation />
2121
<PackageId>ExceptionReporter</PackageId>
22-
<PackageVersion>2.2.2</PackageVersion>
22+
<PackageVersion>2.3.0</PackageVersion>
2323
<Authors>Peter van der Woude, Simon Cropp</Authors>
2424
<PackageLicenseUrl>https://github.com/PandaWood/ExceptionReporter.NET/blob/master/LICENSE.txt</PackageLicenseUrl>
2525
<Owners>Peter van der Woude,Simon Cropp</Owners>

src/ExceptionReporter/Mail/MailSender.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal MailSender(ExceptionReportInfo reportInfo)
2121
}
2222

2323
/// <summary>
24-
/// Send SMTP email, uses native .NET4 SmtpClient library
24+
/// Send SMTP email, uses native .NET SmtpClient library
2525
/// Requires following ExceptionReportInfo properties to be set:
2626
/// SmtpPort, SmtpUseSsl, SmtpUsername, SmtpPassword, SmtpFromAddress, EmailReportAddress
2727
/// </summary>

src/ExceptionReporter/Views/ExceptionReportView.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ void PopulateReportInfo(ExceptionReportInfo reportInfo)
5555

5656
txtDate.Text = reportInfo.ExceptionDate.ToShortDateString();
5757
txtTime.Text = reportInfo.ExceptionDate.ToShortTimeString();
58-
txtUserName.Text = reportInfo.UserName;
59-
txtMachine.Text = reportInfo.MachineName;
6058
txtRegion.Text = reportInfo.RegionInfo;
6159
txtApplicationName.Text = reportInfo.AppName;
6260
txtVersion.Text = reportInfo.AppVersion;

0 commit comments

Comments
 (0)