org.esupportail.commons.services.logging.Logger类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(223)

本文整理了Java中org.esupportail.commons.services.logging.Logger类的一些代码示例,展示了Logger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger类的具体详情如下:
包路径:org.esupportail.commons.services.logging.Logger
类名称:Logger

Logger介绍

暂无

代码示例

代码示例来源:origin: org.esupportail/esup-commons2-jsf2

/**
 * Make an EL Expression.
 * EX. : #{param}
 * @param param 
 * @return String
 */
public static String makeELExpression(final String param) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("entering makeELExpression(" + param + " )");
  }
  return "#{" + param + "}";
}

代码示例来源:origin: org.esupportail/ects-domain-services

/**
 * @see org.esupportail.ects.domain.DomainService#getSignataires()
 */
@Override
@Cacheable(cacheName = CacheModelConst.REF_DEFAULT_MODEL)
public SignataireWSSignataireDTO[] getSignataires() {
  if (logger.isDebugEnabled()) {
    logger.debug("entering getSignataires()");
  }
  
  SignataireWSSignataireDTO[] res = null;
  try {
    ReferentielMetierServiceInterface referentielMetierService
    =  (ReferentielMetierServiceInterface) WSUtils.getService(WSUtils.REFERENTIEL_SERVICE_NAME);
    // Recherche des signataires dans Apogee
    // recupererSignataire( _codSig, _temoinEnService)
    res = referentielMetierService.recupererSignataire("", "O");
  } catch (RemoteException e) {
    logger.error("RemoteException in getSignataires() = " + e);
    return null;
  } catch (WebBaseException e) {
    logger.error("WebBaseException in getSignataires() = " + e);
    return null;
  }
  
  return res;
}

代码示例来源:origin: org.esupportail/esup-commons2-exceptionHandling

/**
 * Log a text report.
 * @param t
 * @param textReport
 */
protected void logTextReport(final Throwable t, final String textReport) {
  if (SimpleExceptionServiceFactoryImpl.ERROR.equals(logLevel.toLowerCase())) {
    logger.error(textReport);
  } else if (SimpleExceptionServiceFactoryImpl.WARN.equals(logLevel.toLowerCase())) {
    logger.error(ExceptionUtils.getShortPrintableStackTrace(t));
    logger.warn(textReport);
  } else if (SimpleExceptionServiceFactoryImpl.INFO.equals(logLevel.toLowerCase())) {
    logger.error(ExceptionUtils.getShortPrintableStackTrace(t));
    logger.info(textReport);
  } else if (SimpleExceptionServiceFactoryImpl.TRACE.equals(logLevel.toLowerCase())) {
    logger.error(ExceptionUtils.getShortPrintableStackTrace(t));
    if (logger.isTraceEnabled()) {
      logger.trace(textReport);
    }
  } else {
    logger.error(ExceptionUtils.getShortPrintableStackTrace(t));
    if (logger.isDebugEnabled()) {
      logger.debug(textReport);
    }
  }
}

代码示例来源:origin: org.esupportail/esup-commons2-web

@Override
public void afterPropertiesSet() {
  if (authorizedClientNames == null || authorizedClientNames.isEmpty()) {
    authorizedClientNames = null;
    logger.warn("property authorizedClients is not set, no access control will be done.");
  }
  if (logger.isDebugEnabled()) {
    for (String authorizedClientName : authorizedClientNames) {
      logger.debug("authorized client: " + authorizedClientName);
    }
  }
}

代码示例来源:origin: org.esupportail/esup-commons2-dao

/**
 * @return the hql request.
 */
public String buildHql() {
  if (log.isDebugEnabled()) {
    log.debug("entering HqlQueryPojo.buildHql()");
  }
  StringBuilder hql = new StringBuilder();
  hql.append(appendHql(select, "SELECT ", ", "));
  hql.append(appendHql(from, " FROM ", ", "));
  hql.append(appendHql(where, " WHERE ", " AND "));
  log.info("exiting HqlQueryPojo.buildHql() with hql = " + hql.toString());
  return hql.toString();
}

代码示例来源:origin: org.esupportail/esup-commons2-web

/**
 * Debug any object.
 * @param logger 
 * @param title
 * @param o
 */
public static void print(final Logger logger, final String title, final Object o) {
  logger.debug("*******************************************************************");
  print(logger, title, o, 1);
  logger.debug("*******************************************************************");
}

代码示例来源:origin: org.esupportail/esup-opi-domain-beans

/**
 * @return the candidats
 */
public Map<Individu, Date> getDateParCandidat() {
  if (dateParCandidat == null) {
    logger.debug("Dans getDateParCandidat : " + dateParCandidat);
    dateParCandidat = new HashMap<Individu, Date>();
    for (IndividuDate indDate : candidats) {
      if (!dateParCandidat.containsKey(indDate.getCandidat())
          && indDate.getDateRdv().after(new Date())) {
        dateParCandidat.put(indDate.getCandidat(), indDate.getDateRdv());
      }
    }
    logger.info("En fin de getDateParCandidat : " + dateParCandidat);
  }
  return dateParCandidat;
}

代码示例来源:origin: org.esupportail/ects-utils

/**
 * @param file
 * @param facesContext
 * @param contentType
 */
public void setDownLoadAndSend(final File file,
                final FacesContext facesContext,
                final String contentType,
                final String contentDisposition) {
  try {
    LOGGER.debug("DownloadUtils.setDownload(data," + contentType + "," + contentDisposition + ")");
    Long id = DownloadUtils.setDownload(file, contentType, contentDisposition);
    String url = getDownloadUrl(id);
    ExternalContext externalContext = facesContext.getExternalContext();
    externalContext.redirect(url);
    facesContext.responseComplete();
  } catch (IOException e) {
    LOGGER.error("probleme lors de l envoi d un ficher. - exception : " + e);
  }
}

代码示例来源:origin: org.esupportail/esup-commons2-exceptionHandling

@Override
public void handleException() throws ExceptionHandlingException {
  logger.error(throwable);
  throw new ExceptionHandlingException(throwable);
}

代码示例来源:origin: org.esupportail/esup-commons2-jsf

@Override
protected void debugEvent(
    final PhaseEvent event,
    final String string) {
  if (logger.isDebugEnabled()) {
    super.debugEvent(event, string);
    debugMessages(event);
  }
}

代码示例来源:origin: org.esupportail/esup-commons2-hibernate

/**
 * Update the database.
 * @throws ConfigException 
 */
public static void update() throws ConfigException {
  LOG.info("updating the database, please wait...");
  LOG.info("this operation may take from a few seconds to a couple of hours for huge migrations.");
  LOG.info("do not interrupt!");
  getDatabaseManagerStore().update();
  LOG.info("done.");
}

代码示例来源:origin: org.esupportail/esup-commons2-web

@Override
public void afterPropertiesSet() {
  if (casLoginUrl == null) {
    if (casUrl == null) {
      logger.warn("casLoginUrl and casUrl are null, URLs via CAS will not be available");
    } else {
      casLoginUrl = casUrl + "/login?service=%s";
    }
  }
}

代码示例来源:origin: org.esupportail/esup-opi-domain-beans

String methodId = "get" + new String(charTable);
if (log.isDebugEnabled()) {
  log.debug("Methode id : " + methodId);
  Method m = methods[i];
  if (m.getName().equals(methodId)) {
    if (log.isDebugEnabled()) {
      log.debug("methods : " + m.getName());
  log.warn("l'attribut " + methodId + " représentant l'identifiant n'existe pas");
  return null;

代码示例来源:origin: org.esupportail/ects-domain-services

if (logger.isDebugEnabled()) {
  logger.debug("entering getUtilisateurApo(" + id + ")");
  logger.info("userApo = " + userApo.getCodUti());
} else {
  logger.info("userApo = null");

代码示例来源:origin: org.esupportail/example-domain-services

/**
 * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
 */
@Override
public void afterPropertiesSet() throws Exception {
  logger.debug("in afterPropertiesSet");
  Assert.notNull(this.daoService, 
      "property daoService of class " + this.getClass().getName() + " can not be null");
}

代码示例来源:origin: org.esupportail/esup-opi-domain-beans

List<Date> liste = new ArrayList<Date>();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy.MM.dd G HH:mm:ss z");
logger.debug("Cal : " + sdf1.format(cal.getTime()));
debMatin.setTime(cal.getTime());
logger.info("Horaires : " + getHoraires());
debMatin.set(Calendar.MILLISECOND, deb.get(Calendar.MILLISECOND));
logger.debug("Debut : " + debMatin.toString());
logger.debug("Fin : " + finMatin.toString());
    logger.info("Le creneau " + date.toString() 
        + "est plein ! On ne propose pas cette date !");
    if (!etudiant) {

代码示例来源:origin: org.esupportail/ects-utils

/**
 * @param data
 * @param facesContext
 * @param contentType
 * @param fileName
 */
public void setDownLoadAndSend(final byte[] data,
    final FacesContext facesContext,
    final String contentType,
    final String contentDisposition,
    final String fileName) {
  try {
    LOGGER.debug("DownloadUtils.setDownload(data," + fileName + "," + contentType + "," + contentDisposition + ")");
    Long id = DownloadUtils.setDownload(data, fileName, contentType, contentDisposition);
    String url = getDownloadUrl(id);
    ExternalContext externalContext = facesContext.getExternalContext();
    externalContext.redirect(url);
    facesContext.responseComplete();
  } catch (IOException e) {
    LOGGER.error("probleme lors de l envoi d un ficher = " + fileName + "exception : " + e);
  }
}

代码示例来源:origin: org.esupportail/esup-opi-web-beans

/**
 * @param zipStream
 * @param fileNameCsv
 * @param map
 * @return ZipOutputStream
 */
public static ZipOutputStream prepareCSVinZip(final ZipOutputStream zipStream,
    final String fileNameCsv, final Map<Integer, List<String>> map) {
  try {
    String s = makeCvs(map);
    
    ZipEntry zipEntry = new ZipEntry(fileNameCsv);
    zipStream.putNextEntry(zipEntry);
    
    zipStream.write(s.getBytes());
    zipStream.closeEntry();
  } catch (IOException e) {
    LOGGER.error("probleme de preparation du zip contenant le csv = " 
              + fileNameCsv + "exception : " + e);
  }                         
  
  return zipStream;
}

代码示例来源:origin: org.esupportail/esup-commons2-jsf2

@Override
protected void debugEvent(
    final PhaseEvent event,
    final String string) {
  if (logger.isDebugEnabled()) {
    super.debugEvent(event, string);
    debugMessages(event);
  }
}

代码示例来源:origin: org.esupportail/esup-commons2-hibernate

/**
 * Create the database.
 * @throws ConfigException 
 */
public static void create() throws ConfigException {
  LOG.info("creating the databases, please wait...");
  LOG.info("this operation may take a few minutes, do not interrupt!");
  getDatabaseManagerStore().create();
  LOG.info("done.");
}

相关文章