public void logged(org.osgi.service.log.LogEntry entry)
{
if (entry.getLevel() > logLevel.getValue())
return;
LogEntry logEntry = LogFactory.eINSTANCE.createLogEntry();
logEntry.setLevel(LogLevel.get(entry.getLevel()));
logEntry.setMessage(entry.getMessage());
logEntry.setCreatedOn(new Date());
Throwable exception = entry.getException();
if (exception != null)
{
StringWriter stack = new StringWriter();
PrintWriter out = new PrintWriter(stack);
exception.printStackTrace(out);
logEntry.setExceptionMessage(exception.getMessage());
logEntry.setExceptionStack(stack.toString());
}
ResourceSet resourceSet = resourceSetFactory.createResourceSet();
Resource resource = resourceSet.createResource(uri);