int column = 0;
clearColumns();
Function1 function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getTimestamp();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Time");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getHost();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Host");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getContainerName();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Container");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getLevel();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Level", new LogLevelImageProvider());
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getLogger();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Logger");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getThread();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Thread");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getMessage();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Message");
function = new Function1() {
@Override
public Object apply(Object element) {
return element;
}
};
column = addColumnFunction(bounds, column, function, "Location", new LocationLabelProvider());
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getProperties();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Properties");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null) {
return log.getSeq();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "ID");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEvent log = toLogEvent(element);
if (log != null && log.getException() != null) {
StringBuffer sb = new StringBuffer();
for (String s : log.getException()) {
sb.append(s);
sb.append('\n');
}
return sb.toString();
}