org.jboss.logging.Logger.info()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(222)

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

Logger.info介绍

[英]Issue a log message with a level of INFO.
[中]发出具有信息级别的日志消息。

代码示例

代码示例来源:origin: quartz-scheduler/quartz

@Override
public void destroyService() throws Exception {
  log.info("Destroy QuartzService(" + jndiName + ")...");
  schedulerFactory = null;
  log.info("QuartzService(" + jndiName + ") destroyed.");
}

代码示例来源:origin: wildfly/wildfly

@Override
  public void logMessage(String message) {
    logger.info(message);
  }
}

代码示例来源:origin: quartz-scheduler/quartz

@Override
public void destroyService() throws Exception {
  log.info("Destroy QuartzService(" + jndiName + ")...");
  schedulerFactory = null;
  log.info("QuartzService(" + jndiName + ") destroyed.");
}

代码示例来源:origin: wildfly/wildfly

@Override
public void info(String msg) {
  this.logger.info(msg);
}

代码示例来源:origin: wildfly/wildfly

@Override
public void info(final Object message) {
  log.info(FQCN, message, null);
}

代码示例来源:origin: wildfly/wildfly

@Override
public void info(final Object message, final Throwable t) {
  log.info(FQCN, message, t);
}

代码示例来源:origin: wildfly/wildfly

@Override
public void info(final String loggerFqcn, final Object message, final Throwable t) {
  log.info(loggerFqcn, message, t);
}

代码示例来源:origin: hibernate/hibernate-orm

public static void reportSkip(String message) {
  log.info( "*** skipping test - " + message, new Exception() );
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
public void releaseConnection(Connection connection) throws SQLException {
  // NOTE : reset auto-commit, but *do not* close the Connection.  The application handed us this connection
  if ( !wasInitiallyAutoCommit ) {
    try {
      if ( jdbcConnection.getAutoCommit() ) {
        jdbcConnection.setAutoCommit( false );
      }
    }
    catch (SQLException e) {
      log.info( "Was unable to reset JDBC connection to no longer be in auto-commit mode" );
    }
  }
}

代码示例来源:origin: hibernate/hibernate-orm

public void sleepASecond() {
  try {
    log.info( "Byteman rule triggered: sleeping a second" );
    Thread.sleep( 1000 );
  }
  catch ( InterruptedException e ) {
    Thread.currentThread().interrupt();
    log.error( "unexpected interruption", e );
  }
}

代码示例来源:origin: looly/hutool

@Override
public void info(Throwable t, String format, Object... arguments) {
  logger.info(FQCN, StrUtil.format(format, arguments), t);
}

代码示例来源:origin: looly/hutool

@Override
public void info(Throwable t, String format, Object... arguments) {
  logger.info(FQCN, StrUtil.format(format, arguments), t);
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * {@inheritDoc}
 *
 * @see org.junit.runners.ParentRunner#classBlock(org.junit.runner.notification.RunNotifier)
 */
@Override
protected Statement classBlock(RunNotifier notifier) {
  log.info( BeforeClass.class.getSimpleName() + ": " + getName() );
  return super.classBlock( notifier );
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
protected Statement methodBlock(FrameworkMethod method) {
  log.info( Test.class.getSimpleName() + ": " + method.getName() );
  final Statement originalMethodBlock = super.methodBlock( method );
  final ExtendedFrameworkMethod extendedFrameworkMethod = (ExtendedFrameworkMethod) method;
  return new FailureExpectedHandler(
      originalMethodBlock,
      testClassMetadata,
      extendedFrameworkMethod,
      testInstance
  );
}

代码示例来源:origin: hibernate/hibernate-orm

public static void dumpMetaModelSourceFor(Class<?> clazz) {
  log.info( "Dumping meta model source for " + clazz.getName() + ":" );
  log.info( getMetaModelSourceAsString( clazz ) );
}

代码示例来源:origin: hibernate/hibernate-orm

@Test
public void testFlushAutoJPQL() {
  doInJPA( this::entityManagerFactory, entityManager -> {
    log.info( "testFlushAutoJPQL" );
    //tag::flushing-auto-flush-jpql-example[]
    Person person = new Person( "John Doe" );
    entityManager.persist( person );
    entityManager.createQuery( "select p from Advertisement p" ).getResultList();
    entityManager.createQuery( "select p from Person p" ).getResultList();
    //end::flushing-auto-flush-jpql-example[]
  } );
}

代码示例来源:origin: hibernate/hibernate-orm

@Test
public void testFlushAutoJPQLOverlap() {
  doInJPA( this::entityManagerFactory, entityManager -> {
    log.info( "testFlushAutoJPQLOverlap" );
    //tag::flushing-auto-flush-jpql-overlap-example[]
    Person person = new Person( "John Doe" );
    entityManager.persist( person );
    entityManager.createQuery( "select p from Person p" ).getResultList();
    //end::flushing-auto-flush-jpql-overlap-example[]
  } );
}

代码示例来源:origin: hibernate/hibernate-orm

@Test
public void lookupEntities_entrySet() {
  doInHibernate( this::sessionFactory, sess -> {
    List<Library> libraries = sess.createQuery( "FROM Library").list();
    assertEquals(1, libraries.size());
    Library library = libraries.get( 0);
    assertNotNull(library);
    assertEquals(2, library.getBooksOnInventory().size());
    for (Entry<String,Book> entry : library.getBooksOnInventory().entrySet()) {
      log.info("Found SKU " + entry.getKey() + " with ISBN " + entry.getValue().getIsbn());
    }
  } );
}

代码示例来源:origin: hibernate/hibernate-orm

@Test
public void lookupEntities_entrySet() {
  doInHibernate( this::sessionFactory, sess -> {
    List<Library> libraries = sess.createQuery( "FROM Library").list();
    assertEquals(1, libraries.size());
    Library library = libraries.get( 0);
    assertNotNull(library);
    assertEquals(2, library.getBooksOnInventory().size());
    for (Entry<String,Book> entry : library.getBooksOnInventory().entrySet()) {
      log.info("Found SKU " + entry.getKey() + " with ISBN " + entry.getValue().getIsbn());
    }
  } );
}

代码示例来源:origin: hibernate/hibernate-orm

@SuppressWarnings("WeakerAccess")
protected void handleLockExpiry(SharedSessionContractImplementor session, Object key, Lockable lock) {
  SecondLevelCacheLogger.INSTANCE.softLockedCacheExpired( getRegion().getName(), key );
  log.info( "Cached entry expired : " + key );
  // create new lock that times out immediately
  long ts = getRegion().getRegionFactory().nextTimestamp() + getRegion().getRegionFactory().getTimeout();
  SoftLockImpl newLock = new SoftLockImpl( ts, uuid, nextLockId.getAndIncrement(), null );
  //newLock.unlock( ts );
  newLock.unlock( ts - getRegion().getRegionFactory().getTimeout() );
  getStorageAccess().putIntoCache( key, newLock, session );
}

相关文章