protected void createColumns() {
int bounds = 100;
int column = 0;
clearColumns();
Function1 function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getEventTimestamp();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Time");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getEventhost();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Host");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getContainer();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Container");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getLogLevel();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Level", new LogLevelImageProvider());
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getLogger();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Category");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getThreadName();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Thread");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
String msg = log.getLogMessage();
if (msg.indexOf('\n') != -1) {
return log.getLogMessage().substring(0, log.getLogMessage().indexOf('\n'));
}
return log.getLogMessage();
}
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) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getPropertiesMap();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "Properties");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getSeq();
}
return null;
}
};
column = addColumnFunction(bounds, column, function, "ID");
function = new Function1() {
@Override
public Object apply(Object element) {
LogEventDTO log = (LogEventDTO)element;
if (log != null) {
return log.getException();