Skip to content

Commit

Permalink
do not expose logger from RCTHost (#37235)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37235

Changelog: [Internal]

we shouldn't expose the logger, only need to expose the logging information

Reviewed By: javache

Differential Revision: D45513780

fbshipit-source-id: b82496ebcbf87d7f88d6c7e1afea655d4177a0d8
  • Loading branch information
philIip authored and facebook-github-bot committed May 3, 2023
1 parent 71fbb0c commit b07c812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ NS_ASSUME_NONNULL_BEGIN
@class RCTFabricSurface;
@class RCTJSThreadManager;
@class RCTModuleRegistry;
@class RCTPerformanceLogger;
@protocol RCTInstanceDelegate;
FB_RUNTIME_PROTOCOL
@protocol RCTTurboModuleManagerDelegate;
Expand Down Expand Up @@ -74,7 +73,7 @@ RCT_EXTERN NSString *const RCTHostDidReloadNotification;

- (RCTModuleRegistry *)getModuleRegistry FB_OBJC_DIRECT;

- (RCTPerformanceLogger *)getPerformanceLogger FB_OBJC_DIRECT;
- (NSArray *)getLoggingData FB_OBJC_DIRECT;

- (RCTSurfacePresenter *)getSurfacePresenter FB_OBJC_DIRECT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import <React/RCTFabricSurface.h>
#import <React/RCTJSThread.h>
#import <React/RCTLog.h>
#import <React/RCTPerformanceLogger.h>
#import <React/RCTReloadCommand.h>

using namespace facebook::react;
Expand Down Expand Up @@ -201,9 +202,9 @@ - (RCTModuleRegistry *)getModuleRegistry
return _moduleRegistry;
}

- (RCTPerformanceLogger *)getPerformanceLogger
- (NSArray *)getLoggingData
{
return [_instance performanceLogger];
return [[_instance performanceLogger] valuesForTags];
}

- (RCTSurfacePresenter *)getSurfacePresenter
Expand Down

0 comments on commit b07c812

Please sign in to comment.