Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Android set Log Level Error but keep receiving logs at insight

insights

#1

I have these line of code in my default activity. It is supposed to log errors only but insight is logging all events. I am very confused now. Did I missed something?

NewRelic.withApplicationToken(“TOKEN”)
.withCrashReportingEnabled(true)
.withLogLevel(AgentLog.ERROR)
.start(this.application)


#2

Hi @thuan,

.withLogLevel(AgentLog.ERROR) is a feature flag for the mobile agent’s external logging. All events will be recorded in Insights completely independent of this flag, but you will only see errors in your app’s runtime log. Here is some additional information about setting the agents feature flags and logging levels: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/api-guides/android-agent-configuration-feature-flags

I hope this is helpful! Please let us know if you have any additional questions.

-Danyel