@@ -43,7 +43,7 @@ private void PopulateApplicationInfo(EnvironmentInfo info) {
43
43
try {
44
44
info . Data . Add ( "AppDomainName" , AppDomain . CurrentDomain . FriendlyName ) ;
45
45
} catch ( Exception ex ) {
46
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get AppDomain friendly name. Error message: {0}" , ex . Message ) ;
46
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get AppDomain friendly name. Error message: {0}" , ex . Message ) ;
47
47
}
48
48
#endif
49
49
@@ -53,7 +53,7 @@ private void PopulateApplicationInfo(EnvironmentInfo info) {
53
53
if ( hostEntry != null && hostEntry . AddressList . Any ( ) )
54
54
info . IpAddress = String . Join ( ", " , hostEntry . AddressList . Where ( x => x . AddressFamily == AddressFamily . InterNetwork ) . Select ( a => a . ToString ( ) ) . ToArray ( ) ) ;
55
55
} catch ( Exception ex ) {
56
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get ip address. Error message: {0}" , ex . Message ) ;
56
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get ip address. Error message: {0}" , ex . Message ) ;
57
57
}
58
58
#endif
59
59
}
@@ -62,7 +62,7 @@ private void PopulateProcessInfo(EnvironmentInfo info) {
62
62
try {
63
63
info . ProcessorCount = Environment . ProcessorCount ;
64
64
} catch ( Exception ex ) {
65
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get processor count. Error message: {0}" , ex . Message ) ;
65
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get processor count. Error message: {0}" , ex . Message ) ;
66
66
}
67
67
68
68
#if ! PORTABLE && ! NETSTANDARD1_2
@@ -71,7 +71,7 @@ private void PopulateProcessInfo(EnvironmentInfo info) {
71
71
info . ProcessName = process . ProcessName ;
72
72
info . ProcessId = process . Id . ToString ( NumberFormatInfo . InvariantInfo ) ;
73
73
} catch ( Exception ex ) {
74
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get process name or id. Error message: {0}" , ex . Message ) ;
74
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get process name or id. Error message: {0}" , ex . Message ) ;
75
75
}
76
76
77
77
try {
@@ -81,7 +81,7 @@ private void PopulateProcessInfo(EnvironmentInfo info) {
81
81
info . CommandLine = Environment . CommandLine ;
82
82
#endif
83
83
} catch ( Exception ex ) {
84
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get command line. Error message: {0}" , ex . Message ) ;
84
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get command line. Error message: {0}" , ex . Message ) ;
85
85
}
86
86
#endif
87
87
}
@@ -91,13 +91,13 @@ private void PopulateThreadInfo(EnvironmentInfo info) {
91
91
try {
92
92
info . ThreadId = Thread . CurrentThread . ManagedThreadId . ToString ( NumberFormatInfo . InvariantInfo ) ;
93
93
} catch ( Exception ex ) {
94
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get thread id. Error message: {0}" , ex . Message ) ;
94
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get thread id. Error message: {0}" , ex . Message ) ;
95
95
}
96
96
97
97
try {
98
98
info . ThreadName = Thread . CurrentThread . Name ;
99
99
} catch ( Exception ex ) {
100
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get current thread name. Error message: {0}" , ex . Message ) ;
100
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get current thread name. Error message: {0}" , ex . Message ) ;
101
101
}
102
102
#endif
103
103
}
@@ -108,7 +108,7 @@ private void PopulateMemoryInfo(EnvironmentInfo info) {
108
108
Process process = Process . GetCurrentProcess ( ) ;
109
109
info . ProcessMemorySize = process . PrivateMemorySize64 ;
110
110
} catch ( Exception ex ) {
111
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get process memory size. Error message: {0}" , ex . Message ) ;
111
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get process memory size. Error message: {0}" , ex . Message ) ;
112
112
}
113
113
#endif
114
114
@@ -128,7 +128,7 @@ private void PopulateMemoryInfo(EnvironmentInfo info) {
128
128
info . AvailablePhysicalMemory = Convert . ToInt64 ( computerInfo . AvailablePhysicalMemory ) ;
129
129
}
130
130
} catch ( Exception ex ) {
131
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get physical memory. Error message: {0}" , ex . Message ) ;
131
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get physical memory. Error message: {0}" , ex . Message ) ;
132
132
}
133
133
#endif
134
134
}
@@ -164,7 +164,7 @@ private void PopulateRuntimeInfo(EnvironmentInfo info) {
164
164
info . MachineName = Guid . NewGuid ( ) . ToString ( "N" ) ;
165
165
#endif
166
166
} catch ( Exception ex ) {
167
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get machine name. Error message: {0}" , ex . Message ) ;
167
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get machine name. Error message: {0}" , ex . Message ) ;
168
168
}
169
169
170
170
#if ! PORTABLE && ! NETSTANDARD1_2
@@ -181,7 +181,7 @@ private void PopulateRuntimeInfo(EnvironmentInfo info) {
181
181
computerInfo = new Microsoft . VisualBasic . Devices . ComputerInfo ( ) ;
182
182
#endif
183
183
} catch ( Exception ex ) {
184
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get computer info. Error message: {0}" , ex . Message ) ;
184
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get computer info. Error message: {0}" , ex . Message ) ;
185
185
}
186
186
187
187
#if NETSTANDARD || NET45
@@ -202,7 +202,7 @@ private void PopulateRuntimeInfo(EnvironmentInfo info) {
202
202
info . RuntimeVersion = Environment . Version . ToString ( ) ;
203
203
#endif
204
204
} catch ( Exception ex ) {
205
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get populate runtime info. Error message: {0}" , ex . Message ) ;
205
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get populate runtime info. Error message: {0}" , ex . Message ) ;
206
206
}
207
207
#endif
208
208
}
@@ -246,7 +246,7 @@ private bool Is64BitOperatingSystem() {
246
246
247
247
return ( ( methodExist && KernelNativeMethods . IsWow64Process ( KernelNativeMethods . GetCurrentProcess ( ) , out is64 ) ) && is64 ) ;
248
248
} catch ( Exception ex ) {
249
- _log . FormattedError ( typeof ( DefaultEnvironmentInfoCollector ) , ex , "Unable to get CPU architecture. Error message: {0}" , ex . Message ) ;
249
+ _log . FormattedWarn ( typeof ( DefaultEnvironmentInfoCollector ) , "Unable to get CPU architecture. Error message: {0}" , ex . Message ) ;
250
250
}
251
251
252
252
return false ;
0 commit comments