Logger Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The
Loggerinterface is deprecated and should no longer be used.Debug logging for Google Analytics should now be enabled using the adb command
adb shell setprop log.tag.GAv4 DEBUG.Google Analytics logs to logcat under the
GAv4tag using the Android Log system.By default, only ERROR, WARN, and INFO log levels are enabled for Google Analytics.
You can view only Google Analytics messages in logcat using the command
adb logcat -v time -s GAv4.
This interface is deprecated.
Logger interface is deprecated. Useadb shell setprop log.tag.GAv4 DEBUG to enable debug logging for Google Analytics.
Deprecated Analytics Logger interface. Google Analytics will log to logcat underGAv4 tag using AndroidLog system. By default only ERROR, WARN and INFO levels are enabled. To enable DEBUG level run the following adb command on your device or emulator:
adb shell setprop log.tag.GAv4 DEBUG
To see only Google Analytics messages from logcat use the following command:
adb logcat -v time -s GAv4
For more information consult thelogcat andadb developer documentation.
Nested Class Summary
| class | Logger.LogLevel | This class is deprecated. SeeLogger interface for details. | |
Public Method Summary
| abstract void | |
| abstract void | |
| abstract int | getLogLevel() This method is deprecated. See Logger interface for details. |
| abstract void | |
| abstract void | setLogLevel(int level) This method is deprecated. See Logger interface for details. |
| abstract void | |
| abstract void |
Public Methods
public abstract voiderror(Exception exception)
This method is deprecated.
SeeLogger interface for details.
Used to log runtime errors or unexpected conditions. These errors will likely result in data not being sent to the GA servers.
Parameters
| exception | The exception that was thrown that caused the error. |
|---|
public abstract voiderror(String message)
This method is deprecated.
SeeLogger interface for details.
Used to log runtime errors or unexpected conditions. These errors will likely result in data not being sent to the GA servers.
Parameters
| message | A string describing the error that occurred. |
|---|
public abstract intgetLogLevel()
This method is deprecated.
SeeLogger interface for details.
Return the current log level.
public abstract voidinfo(String message)
This method is deprecated.
SeeLogger interface for details.
Used to log information on the flow through the system and other interesting events.
Parameters
| message | the message to log |
|---|
public abstract voidsetLogLevel(int level)
public abstract voidverbose(String message)
This method is deprecated.
SeeLogger interface for details.
Used to log detailed information. This information will probably only be useful during development and debugging.
Parameters
| message | the message to log |
|---|
public abstract voidwarn(String message)
This method is deprecated.
SeeLogger interface for details.
Used in situations like use of deprecated APIs, poor use of API, near errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".
Parameters
| message | the message to log |
|---|
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.