Examples of LogEntry


Examples of scribe.LogEntry

                      nextLine = stackTraceArray[i] + "\n";
                      stackTrace.append(nextLine);
                    }
                }
                String message = String.format("%s %s %s", hostname, layout.format(loggingEvent), stackTrace.toString());
                LogEntry entry = new LogEntry(scribe_category, message);

                logEntries.add(entry);
                client.Log(logEntries);
            } catch (TTransportException e) {
                transport.close();
View Full Code Here

Examples of smilehouse.opensyncro.pipes.log.LogEntry

                    labels.getLabel("lastuser"),
                    labels.getLabel("messages")}));

        //colorIndex needed for abort and error colors
        int colorIndex = 0;
        LogEntry logEntryOld = null;
      TD messageCell = new TD();
      boolean firstEntry = true;
        for(Iterator i = entries.iterator(); i.hasNext();) {

            LogMessageEntry entry = (LogMessageEntry) i.next();
           
          LogEntry logEntry = entry.getLog();
          /* 
           * Rows are added to table immediately after logEntry has changed.
           * To detect the change, logEntryOld is used for comparison.
           * When entering the for-loop for the first time logEntryOld is set to logEntry.
           */
          if (firstEntry){
            logEntryOld = logEntry;
            firstEntry = false;
            //check if entry is continued from previous page
            if(entry.getIndex() != 1){
              messageCell.addElement("...");
                messageCell.addElement(new BR());
            }
          }
          /*
           * When logEntry gets new value, the previously collected log message entries are written
           * to table and new TD() is created
           */
        if(!logEntry.equals(logEntryOld)){
              colorIndex = 1 - colorIndex;
              writeRow(logEntryOld, dFormat, colorIndex, tt, logTable, messageCell, labels);

              messageCell = new TD();
              messageCell.setAlign("left"); // IE6 would center the contents by default

              logEntryOld = logEntry;
          }
       
        messageCell.addElement(entry.getMessage());
        messageCell.addElement(new BR());
       
          //write last row (complete or incomplete entry)
        if (!i.hasNext()){
          //check if entry is continued on next page
          if (entry.getIndex() < pers.getMaxMessageIndex(logEntry.getId()))
              messageCell.addElement("...");
          colorIndex = 1 - colorIndex;
              writeRow(logEntryOld, dFormat, colorIndex, tt, logTable, messageCell, labels);
        }
         
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.