Skip to content

Commit

Permalink
Merge pull request #217 from nirmal070125/4.5.x
Browse files Browse the repository at this point in the history
CCOMMONS-10: implementing clearLogs functionality for InMemoryLogProvider
  • Loading branch information
Niranjan-K committed Apr 29, 2016
2 parents b494935 + a5ebcb8 commit 7a207a6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ public int logsCount(String tenantDomain, String serverKey) throws LogViewerExce

@Override
public boolean clearLogs() {
Appender appender = Logger.getRootLogger().getAppender(LoggingConstants.WSO2CARBON_MEMORY_APPENDER);
if (appender instanceof CarbonMemoryAppender) {
CarbonMemoryAppender memoryAppender = (CarbonMemoryAppender) appender;
memoryAppender.getCircularQueue().clear();
return true;
}
return false;
}

Expand Down

0 comments on commit 7a207a6

Please sign in to comment.