Created
April 4, 2014 17:39
-
-
Save detro/9979394 to your computer and use it in GitHub Desktop.
This file contains 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
private LogEntries getRemoteEntries(String logType) { | |
Object raw = executeMethod.execute(DriverCommand.GET_LOG, ImmutableMap.of(TYPE_KEY, logType)); | |
@SuppressWarnings("unchecked") | |
List<Map<String, Object>> rawList = (List<Map<String, Object>>) raw; | |
List<LogEntry> remoteEntries = Lists.newArrayListWithCapacity(rawList.size()); | |
for (Map<String, Object> obj : rawList) { | |
remoteEntries.add(new LogEntry(LogLevelMapping.toLevel((String)obj.get(LEVEL)), | |
(Long) obj.get(TIMESTAMP), | |
(String) obj.get(MESSAGE))); | |
} | |
return new LogEntries(remoteEntries); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment