-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nr 318119 auto collect stdout & stderr logs (#320)
* NR-318119 adding the ability to collect the logs sent to stdout and stderr * NR-318119 added a way to extract type of OSLog and fixed timestamp format * Removed unneeded test * NR-318119 Renamed the flag to include stderr and changed the log divider to \n\n * Trying to get more accurate timestamps when one's not there * Changed the log collector to use a pipe and added a unit test * Restoring the logging sooner in the test to hopefully see failed test logs * Trying to fix a test that only fails on github * trying to fix test run on github * It looks like github unit tests don't have oslog debug enabled * Looks like this test doesn't work on github for watchOS, will need to look further into it * Unit test changes * Restoring the first delay in the test * Trying to make the test less flakey * Using sleep instead of the wait * Adjusting the sleep value * We need default priority or the collected logs don't maintain perfect accuracy * NRLogger: Fix to honor remote log level and local log level correctly. * Revert "NRLogger: Fix to honor remote log level and local log level correctly." This reverts commit 28790a5. * Changing the name and default status of the feature flag, only redirect if remote logging is enabled * Forgot to change flag in unit tests * Added a stress test WIP, created the pipes one at a time so we can close them if needed * Removed the feature flag and only capture logs when the debugger isn't attached * Updating the Xcode version used in main.yml * trying to update to macos-14 in main.yml * trying xcode 15.4 * Changed the requiredAttributes to work with the auto-collected logs better * Added back the feature flag after discussion * Update Agent/Utilities/NRLogger.m Co-authored-by: Chris Dillard <[email protected]> --------- Co-authored-by: Chris Dillard <[email protected]> Co-authored-by: Chris Dillard <[email protected]>
- Loading branch information
1 parent
2fb2fd6
commit e31d8d4
Showing
17 changed files
with
556 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// NRAutoLogCollector.h | ||
// Agent | ||
// | ||
// Created by Mike Bruin on 10/9/24. | ||
// Copyright © 2024 New Relic. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NRAutoLogCollector : NSObject { | ||
|
||
|
||
} | ||
|
||
+ (BOOL) redirectStandardOutputAndError; | ||
+ (void) restoreStandardOutputAndError; | ||
+ (BOOL) hasRedirectedStdOut; | ||
|
||
@end |
Oops, something went wrong.