Examples of LogRecord


Examples of com.taobao.loganalyzer.input.tanxpv.common.LogRecord

     * @param line 需要解析的pv日志
     * @param flags 需要解析的pv日志的section的列表,true为需要解析,false为不需要解析;建议熟悉底层解析逻辑者使用。
     * @return 解析的结果,存储在TanxPVLog中,null表示格式不符合
     */
    public static TanxPVLog parse(String line, boolean[] flags) {
        LogRecord lr = parseTanxPV(line, flags);
        if (lr == null) return null;
        return new TanxPVLog(lr);
    }
View Full Code Here

Examples of com.taobao.loganalyzer.input.tanxpv.common.LogRecord

                } else if (lp.curChar() == LogParser.CONTROL_A) {
                    if (!lp.hasNextChar()) return false;
                    break;
                }

                LogRecord inner_lr = new LogRecord();

                //service id
                inner_lr.addField("ServiceID", new LogField(LogField.TYPE_STRING, lp.getNextCC()));

                //origin  商品来源
                inner_lr.addField("Origin",    new LogField(LogField.TYPE_STRING, lp.getNextCC()));

                //客户ID
                inner_lr.addField("MemberID"new LogField(LogField.TYPE_STRING, lp.getNextCC()));

                //本次商品的价格
                inner_lr.addField("Price",     new LogField(LogField.TYPE_STRING, lp.getNextCC()));

                //客户的回扣率, 小于1.0的3位小数
                inner_lr.addField("Brokerage", new LogField(LogField.TYPE_STRING, lp.getNextCC()));

                //绝对位置
                String abs_pos = lp.getNextField(new char[]{LogParser.CONTROL_B, LogParser.CONTROL_A});
                inner_lr.addField("AbsPos",    new LogField(LogField.TYPE_STRING, abs_pos));

                list.add(inner_lr);
            }
            while (lp.getMatchedChar() != 0 && lp.getMatchedChar() != LogParser.CONTROL_A);
View Full Code Here

Examples of gov.nist.javax.sip.LogRecord

    private void logMessage(String message, String from, String to, boolean sender,
            String callId, String firstLine, String status, String tid, long time,
            long timestampVal) {

        LogRecord log = this.sipStack.logRecordFactory.createLogRecord(message, from, to, time,
                sender, firstLine, tid, callId, timestampVal);
        if (log != null)
            logMessage(log.toString());
    }
View Full Code Here

Examples of java.util.logging.LogRecord

        Configuration config = instance();
        config.configLogger = logger;
        if (config.startupLogRecords != null) {
            Iterator iter = config.startupLogRecords.iterator();
            while (iter.hasNext()) {
                LogRecord lr = (LogRecord) iter.next();
                logger.log(lr.getLevel(), lr.getMessage());
            }
            config.startupLogRecords = null;
        }
    }
View Full Code Here

Examples of java.util.logging.LogRecord

   * @param msg
   * @param t
   */
  private void log(String callerFQCN, Level level, String msg, Throwable t) {
    // millis and thread are filled by the constructor
    LogRecord record = new LogRecord(level, msg);
    record.setLoggerName(getName());
    record.setThrown(t);
    fillCallerData(callerFQCN, record);
    logger.log(record);

  }
View Full Code Here

Examples of java.util.logging.LogRecord

    log4jCategory.log(org.apache.log4j.Level.DEBUG, "world"+(++n));
   
    assertEquals(n, listHandler.list.size());

    for (int i = 0; i < n; i++) {
      LogRecord logRecord = (LogRecord) listHandler.list.get(i);
      assertEquals("test", logRecord.getSourceMethodName());
    }
  }
View Full Code Here

Examples of java.util.logging.LogRecord

    log4jCategory.fatal("msg" +(n++));
    assertEquals(n, listHandler.list.size());
   
    for(int i = 0; i < n; i++) {
      LogRecord logRecord = (LogRecord) listHandler.list.get(i);
      assertEquals("testBug131", logRecord.getSourceMethodName());  
    }
  }
View Full Code Here

Examples of java.util.logging.LogRecord

   * @return may return null
   *
   */
  public LogRecord get()
  {
    LogRecord r = null;
    if (numElems > 0)
    {
      numElems--;
      r = records[first];
      records[first] = null;
View Full Code Here

Examples of java.util.logging.LogRecord

        }
        return true;
    }

    private void logException(Level logLevel, Throwable e) {
        LogRecord record = new LogRecord( logLevel, e.getMessage() );
        record.setThrown( e );
        log.log( record );
    }
View Full Code Here

Examples of java.util.logging.LogRecord

            try {
               log.info("Dump start");
               I_Authenticate auth = xmlBlasterMain.getAuthenticate();
               StringBuffer buf = new StringBuffer(auth.toXml());
               buf.append(xmlBlasterMain.getXmlBlaster().toXml());
               LogRecord record = new LogRecord(Level.INFO, buf.toString());
               log(record);
               log.info("Dump end");
            }
            catch(XmlBlasterException ee) {
               log.severe("Sorry, dump failed: " + ee.getMessage());
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.