Sunday, 4 October 2015

Android: Enabling logs on Snowplow

As the tracking solutions in mobile is increasing, Snowplow could be a good solution to centralize the list of trackers.

By default, the logs on Snowplow is disabled. To enabled, use the follow code:

// Ask Logger level of Snowplow to log data com.snowplowanalytics.snowplow.tracker.utils.Logger.updateLogLevel(LogLevel.VERBOSE);

There are three log levels in Snowplow: e, d, and v, which corresponding to error, debug and verbose, respectively. So, there are four options for the parameter:

  • LogLevel.VERBOSE
  • LogLevel.DEBUG
  • LogLevel.ERROR
  • LogLevel.OFF
The last one is the one which comes by default, which turns offs the logs.

The another thing to take into accounts is the tags for the logging for Snowplow starts with "SnowplowTracker->"

Finally, this options must be done once the emitter and the tracker are set, otherwise they will turn off the logs.

No comments:

Post a Comment