Examples of LogInfo


Examples of com.cedarsolutions.util.JavaLoggingFormatter.LogInfo

        when(record.getMillis()).thenReturn(now.getTime());
        when(record.getLevel()).thenReturn(java.util.logging.Level.INFO);
        when(record.getSourceClassName()).thenReturn("test.class.Name");
        when(record.getMessage()).thenReturn("message");

        LogInfo info = new LogInfo(record);
        assertNotNull(info);
        assertEquals(now, info.getDate());
        assertEquals(org.apache.log4j.Level.INFO, info.getLevel());
        assertEquals("test.class.Name", info.getClassName());
        assertEquals("message", info.getMessage());

        String zone = DateUtils.formatDate(now, "Z"); // like "-0500"
        assertEquals("2011-10-07 13:01:42,663 " + zone + " [INFO ] --> [test.class.Name] message" + StringUtils.LINE_ENDING, info.format());
    }
View Full Code Here

Examples of com.cedarsolutions.util.JavaLoggingFormatter.LogInfo

                                                                       org.apache.log4j.Level.ALL, };

        for (int i = 0; i < input.length; i++) {
            LogRecord record = mock(LogRecord.class);
            when(record.getLevel()).thenReturn(input[i]);
            LogInfo info = new LogInfo(record);
            assertEquals(output[i], info.getLevel());
        }
    }
View Full Code Here

Examples of com.ketayao.ketacustom.entity.main.LogInfo

   
    ShiroUser shiroUser = SecurityUtils.getShiroUser();
   
    //result = shiroUser.toString() + ":" + result;
   
    LogInfo logInfo = new LogInfo();
    logInfo.setCreateTime(new Date());
   
    logInfo.setUsername(shiroUser.getLoginName());
    logInfo.setMessage(result);
    logInfo.setIpAddress(shiroUser.getIpAddress());
    logInfo.setLogLevel(logLevel);
   
    logInfoService.saveOrUpdate(logInfo);
  }
View Full Code Here

Examples of com.sforce.soap.metadata.LogInfo

    /**
     * return null for None log level - exclude this category & level from debuggingHeader.
     */
    public LogInfo getLogInfo() {
        if (this.levelExt != LogCategoryLevelExt.None) {
            LogInfo logInfo = new LogInfo();
            logInfo.setCategory(categoryExt.getLogCategory());
            logInfo.setLevel(levelExt.getLogCategoryLevel());
            return logInfo;
        }
        return null;
    }
View Full Code Here

Examples of com.tistory.devyongsik.crescent.logger.LogInfo

      long endTime = System.currentTimeMillis();
     
      //전체 검색 건수
      totalHitsCount = topDocs.totalHits;
     
      LogInfo logInfo = new LogInfo();
      logInfo.setCollectionName(csrw.getCollectionName());
      logInfo.setElaspedTimeMil(endTime - startTime);
      logInfo.setKeyword(csrw.getKeyword());
      logInfo.setPageNum(csrw.getPageNum());
      logInfo.setPcid(csrw.getPcId());
      logInfo.setQuery(query);
      logInfo.setSort(csrw.getSort());
      logInfo.setTotalCount(totalHitsCount);
      logInfo.setUserId(csrw.getUserId());
      logInfo.setUserIp(csrw.getUserIp());
      logInfo.setFilter(csrw.getFilter());
     
      CrescentLogger.logging(logInfo);
     
     
      logger.debug("Total Hits Count : {} ", totalHitsCount);
View Full Code Here

Examples of org.certificatetransparency.ctlog.LogInfo

      sct = Deserializer.parseSCTFromBinary(new ByteArrayInputStream(sctBytes));
    }

    System.out.println("Canned SCT: " + sct.toString());

    LogInfo logInfo = LogInfo.fromKeyFile(logPublicKeyFile);
    LogSignatureVerifier verifier = new LogSignatureVerifier(logInfo);
    if (verifier.verifySignature(sct, certs)) {
      System.out.println("Signature verified OK.");
    } else {
      System.out.println("Signature verification FAILURE.");
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.LogInfo

    int maxLen = logs.length;
    if (maxLen > 0) {
      List<LogInfo> logInfoList = Arrays.asList(logs);
      Collections.sort(logInfoList, new Comparator<Object>() {
        public int compare(Object o1, Object o2) {
          LogInfo log1 = (LogInfo) o1;
          LogInfo log2 = (LogInfo) o2;
          return log1.getLogName().compareToIgnoreCase(log2.getLogName());
        }

      });
      return (LogInfo[]) logInfoList.toArray(new LogInfo[logInfoList.size()]);
    } else {
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.LogInfo

  }

  private LogInfo[] getLocalLogInfo() {
    String folderPath = CarbonUtils.getCarbonLogsPath();
    LogInfo log = null;
    ArrayList<LogInfo> logs = new ArrayList<LogInfo>();
    File folder = new File(folderPath);
    FileFilter fileFilter = new WildcardFileFilter(
        LoggingConstants.RegexPatterns.LOCAL_CARBON_LOG_PATTERN);
    File[] listOfFiles = folder.listFiles(fileFilter);
    for (File file : listOfFiles) {
      String filename = file.getName();
      String fileDates[] = filename
          .split(LoggingConstants.RegexPatterns.LOG_FILE_DATE_SEPARATOR);
      String filePath = CarbonUtils.getCarbonLogsPath() + LoggingConstants.FILE_SEPARATOR
          + filename;
      File logfile = new File(filePath);
      if (fileDates.length == 2) {
        log = new LogInfo(filename, fileDates[1], getFileSize(logfile));
      } else {
        log = new LogInfo(filename, LoggingConstants.RegexPatterns.CURRENT_LOG,
            getFileSize(logfile));
      }
      if (log != null) {
        logs.add(log);
      }
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.LogInfo

          if (matcher.find()) {
            if (logFileName != null && dates != null && sizes != null) {
              String logName = logFileName[0].replace(
                  LoggingConstants.RegexPatterns.BACK_SLASH_PATTERN, "");
              logName = logName.replaceAll("%20", " ");
              LogInfo log = new LogInfo(logName, dates[0], sizes[0]);
              logs.add(log);
            }
          }
        }
      }
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.