Skip to content

Commit

Permalink
feat: log forwarding functionality
Browse files Browse the repository at this point in the history
Add static Methods for log messages and feature flag for log reporting enabled
  • Loading branch information
ndesai-newrelic committed Jul 24, 2024
1 parent 6fda3c3 commit 062a534
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class NewRelic {
crashCollectorAddress: "",
fedRampEnabled: false,
offlineStorageEnabled: true,
logReportingEnabled: true,
backgroundReportingEnabled: false,
newEventSystemEnabled: true
};
Expand Down
4 changes: 4 additions & 0 deletions new-relic/__tests__/new-relic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ describe('New Relic', () => {
expect(NewRelic.agentConfiguration.offlineStorageEnabled).toBe(true);
expect(NewRelic.agentConfiguration.logReportingEnabled).toBe(true);

expect(NewRelic.agentConfiguration.logReportingEnabled).toBe(true);

expect(NewRelic.agentConfiguration.newEventSystemEnabled).toBe(true);
expect(NewRelic.agentConfiguration.backgroundReportingEnabled).toBe(false);

Expand All @@ -108,6 +110,7 @@ describe('New Relic', () => {
fedRampEnabled: true,
nativeCrashReportingEnabled:false,
offlineStorageEnabled:false,
logReportingEnabled: false
newEventSystemEnabled:false,
backgroundReportingEnabled:true
};
Expand All @@ -128,6 +131,7 @@ describe('New Relic', () => {
expect(NewRelic.agentConfiguration.fedRampEnabled).toBe(true);
expect(NewRelic.agentConfiguration.offlineStorageEnabled).toBe(false);
expect(NewRelic.agentConfiguration.nativeCrashReportingEnabled).toBe(false);
expect(NewRelic.agentConfiguration.logReportingEnabled).toBe(false);
expect(NewRelic.agentConfiguration.newEventSystemEnabled).toBe(false);
expect(NewRelic.agentConfiguration.backgroundReportingEnabled).toBe(true);

Expand Down

0 comments on commit 062a534

Please sign in to comment.