Last active
August 29, 2015 14:23
-
-
Save alizahid/9f59576fafa17cdd9fda to your computer and use it in GitHub Desktop.
SMP Android logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterator<String> logs = App.getLogManager().iterateRawLogData(); | |
while (logs.hasNext()) { | |
Log.e("LOG", logs.next()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterator<ClientLogEntry> logger = App.getLogManager().iterateLogEntries(ClientLogLevel.ALL); | |
Calendar calendar = Calendar.getInstance(); | |
calendar.add(Calendar.MINUTE, -1); | |
Date oneMinuteAgo = calendar.getTime(); | |
while (logger.hasNext()) { | |
ClientLogEntry log = logger.next(); | |
if (log.getDate().after(oneMinuteAgo)) { | |
Log.e("LOG", log.getMessage()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment