Skip to content

Commit 3945ad4

Browse files
committed
Added some logging to better understand what's going on
1 parent 8e3743f commit 3945ad4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Tests/Unit-Tests/NewRelicAgentTests/Uncategorized/NRLoggerTests.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ - (void) testRemoteLogLevels {
214214
// Allow other scheduled run loop activities to proceed
215215
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
216216
}
217+
if (!operationCompleted) {
218+
NSLog(@"Failed to detect 7 writes to the log file.");
219+
}
217220

218221
NSError* error;
219222
NSData* logData = [NRLogger logFileData:&error];
@@ -303,7 +306,9 @@ - (void) testLocalLogLevels {
303306
// Allow other scheduled run loop activities to proceed
304307
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
305308
}
306-
309+
if (!operationCompleted) {
310+
NSLog(@"Failed to detect 4 writes to the log file.");
311+
}
307312
NSError* error;
308313
NSData* logData = [NRLogger logFileData:&error];
309314
if(error){
@@ -384,6 +389,9 @@ - (void) testAutoCollectedLogs {
384389
// Allow other scheduled run loop activities to proceed
385390
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
386391
}
392+
if (!operationCompleted) {
393+
NSLog(@"Failed to detect 5 writes to the log file.");
394+
}
387395

388396
[NRAutoLogCollector restoreStandardOutputAndError];
389397

0 commit comments

Comments
 (0)