public void log(int level, String logSource, String message, Throwable exception) { if (level <= logLevel) { String msg = format(level, logSource, message, exception); System.out.println(msg); EventLogger.logEvent(ID, msg.getBytes(), EventLogger.INFORMATION); } }
public void writeLine(int level, String message, final int fg, final int bg, final boolean bold) { int eventLogLevel = EventLogger.DEBUG_INFO; if (level == Level.DEBUG) { eventLogLevel = EventLogger.DEBUG_INFO; } else if (level == Level.INFO) { eventLogLevel = EventLogger.INFORMATION; } else if (level == Level.WARN) { eventLogLevel = EventLogger.WARNING; } else if (level == Level.ERROR) { eventLogLevel = EventLogger.ERROR; } else if (level == Level.FATAL) { eventLogLevel = EventLogger.SEVERE_ERROR; } EventLogger.logEvent(guid, message.getBytes(), eventLogLevel); }
public EventLogAppender(String pName, String pType, int pThreshold, String pDestination) { super(pName, pType, pThreshold, pDestination); guid = StringUtilities.stringHashToLong(pDestination); EventLogger.register(guid, pDestination, EventLogger.VIEWER_STRING); }
public void clear() { EventLogger.clearLog(); }
public void show() { EventLogger.startEventLogViewer(); }
public void registerDefault() { /* TODO register default log sinks */ EventLogger.register(ID, "Jillian", EventLogger.VIEWER_STRING); }
/** * Entry point for the application * * @param args Command line arguments (not used) */ public static void main(final String[] args) { EventLogger.register(0x9876543212345L, "GPSAdvancedDemo", EventLogger.VIEWER_STRING); final GPSDemoAdvanced app = new GPSDemoAdvanced(); app.enterEventDispatcher(); }