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

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

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

Logger.debugf介绍

[英]Issue a formatted log message with a level of DEBUG.
[中]发出带有调试级别的格式化日志消息。

代码示例

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

@Override
public boolean isReadable(long txTimestamp) {
  if ( DEBUG_ENABLED ) {
    log.debugf(
        "Checking readability of read-write cache item [timestamp=`%s`, version=`%s`] : txTimestamp=`%s`",
        (Object) timestamp,
        version,
        txTimestamp
    );
  }
  return txTimestamp > timestamp;
}

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

@Override
  public boolean afterUpdate(
      SharedSessionContractImplementor session,
      Object key,
      Object value,
      Object currentVersion,
      Object previousVersion,
      SoftLock lock) {
    log.debugf( "Illegal attempt to update item cached as read-only [%s]", key );
    throw new UnsupportedOperationException( "Can't write to a readonly object" );
  }
}

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

@Override
public boolean update(
    SharedSessionContractImplementor session,
    Object key,
    Object value,
    Object currentVersion,
    Object previousVersion) {
  log.debugf( "Illegal attempt to update item cached as read-only [%s]", key );
  throw new UnsupportedOperationException( "Can't update readonly object" );
}

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

public static void registerCascadeStyle(String name, BaseCascadeStyle cascadeStyle) {
  log.tracef( "Registering external cascade style [%s : %s]", name, cascadeStyle );
  final CascadeStyle old = STYLES.put( name, cascadeStyle );
  if ( old != null ) {
    log.debugf(
        "External cascade style registration [%s : %s] overrode base registration [%s]",
        name,
        cascadeStyle,
        old
    );
  }
}

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

@Override
public void setBindValue(T value, Type clarifiedType) {
  internalSetValue( value );
  this.hibernateType = clarifiedType;
  log.debugf( "Using explicit type [%s] as `bindType`", hibernateType, value );
}

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

public synchronized void registerNamedProcedureCallMemento(String name, ProcedureCallMemento memento) {
  final Map<String, ProcedureCallMemento> copy = CollectionHelper.makeCopy( procedureCallMementoMap );
  final ProcedureCallMemento previous = copy.put( name, memento );
  if ( previous != null ) {
    log.debugf(
        "registering named procedure call definition [%s] overriding previously registered definition [%s]",
        name,
        previous
    );
  }
  this.procedureCallMementoMap = Collections.unmodifiableMap( copy );
}

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

@SuppressWarnings({"WeakerAccess", "unchecked"})
protected <S extends J> void internalAddKeySubGraph(Class<S> subType, SubGraph<S> subGraph) {
  log.tracef( "Adding key sub-graph : ( (%s) %s )", subType.getName(), getAttributeName() );
  if ( keySubGraphMap == null ) {
    keySubGraphMap = new HashMap<>();
  }
  final SubGraphImplementor<? extends J> previous = keySubGraphMap.put( subType, (SubGraphImplementor) subGraph );
  if ( previous != null ) {
    log.debugf( "Adding key sub-graph [%s] over-wrote existing [%]", subGraph, previous );
  }
}

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

@Override
public JtaPlatformResolver initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
  final Object setting = configurationValues.get( AvailableSettings.JTA_PLATFORM_RESOLVER );
  final JtaPlatformResolver resolver = registry.getService( StrategySelector.class )
      .resolveStrategy( JtaPlatformResolver.class, setting );
  if ( resolver == null ) {
    log.debugf( "No JtaPlatformResolver was specified, using default [%s]", StandardJtaPlatformResolver.class.getName() );
    return StandardJtaPlatformResolver.INSTANCE;
  }
  return resolver;
}

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

public void addDescriptor(JavaTypeDescriptor descriptor) {
    JavaTypeDescriptor old = descriptorsByClass.put( descriptor.getJavaType(), descriptor );
    if ( old != null ) {
      log.debugf(
          "JavaTypeDescriptorRegistry entry replaced : %s -> %s (was %s)",
          descriptor.getJavaType(),
          descriptor,
          old
      );
    }
  }
}

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

public void deregisterTypeConfiguration(TypeConfiguration typeConfiguration) {
    final TypeConfiguration existing = configurationMap.remove( typeConfiguration.getUuid() );
    if ( existing != typeConfiguration ) {
      LOG.debugf(
          "Different TypeConfiguration [%s] passed to #deregisterTypeConfiguration than previously registered [%s] under that UUID [%s]",
          typeConfiguration,
          existing,
          typeConfiguration.getUuid()
      );
    }
  }
}

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

@SuppressWarnings({"WeakerAccess", "unchecked"})
protected <S extends J> void internalAddSubGraph(Class<S> subType, SubGraphImplementor<S> subGraph) {
  log.tracef( "Adding sub-graph : ( (%s) %s )", subGraph.getGraphedType().getName(), getAttributeName() );
  if ( subGraphMap == null ) {
    subGraphMap = new HashMap<>();
  }
  final SubGraphImplementor<? extends J> previous = subGraphMap.put( subType, (SubGraphImplementor) subGraph );
  if ( previous != null ) {
    log.debugf( "Adding sub-graph [%s] over-wrote existing [%]", subGraph, previous );
  }
}

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

@Override
public void remove(SharedSessionContractImplementor session, Object key) {
  if ( getStorageAccess().getFromCache( key, session ) instanceof SoftLock ) {
    log.debugf( "Skipping #remove call in read-write access to maintain SoftLock : %s", key );
    // don'tm do anything... we want the SoftLock to remain in place
  }
  else {
    super.remove( session, key );
  }
}

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

public Binding bind(URL url) {
    final String urlExternalForm = url.toExternalForm();
    LOG.debugf( "Reading mapping document from URL : %s", urlExternalForm );

    final Origin origin = new Origin( SourceType.URL, urlExternalForm );
    return new UrlXmlSource( origin, url ).doBind( getMappingBinder() );
  }
}

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

@Override
public void setBindValue(T value) {
  internalSetValue( value );
  if ( value != null && hibernateType == null ) {
    hibernateType = procedureParamBindings.getProcedureCall()
        .getSession()
        .getFactory()
        .getTypeResolver()
        .heuristicType( value.getClass().getName() );
    log.debugf( "Using heuristic type [%s] based on bind value [%s] as `bindType`", hibernateType, value );
  }
}

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

public CollectionLoader(
    QueryableCollection collectionPersister,
    QueryBuildingParameters buildingParameters) {
  super( collectionPersister, buildingParameters );
  if ( log.isDebugEnabled() ) {
    log.debugf(
        "Static select for collection %s: %s",
        collectionPersister.getRole(),
        getStaticLoadQuery().getSqlStatement()
    );
  }
}

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

private void collectionProperty(AST path, AST name) throws SemanticException {
  if ( path == null ) {
    throw new SemanticException( "Collection function " + name.getText() + " has no path!" );
  }
  SqlNode expr = (SqlNode) path;
  Type type = expr.getDataType();
  LOG.debugf( "collectionProperty() :  name=%s type=%s", name, type );
  resolveCollectionProperty( expr );
}

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

private <S extends J> SubGraphImplementor<S> internalMakeSubgraph(ManagedTypeDescriptor<S> type) {
  assert type != null;
  log.debugf( "Making sub-graph : ( (%s) %s )", type.getName(), getAttributeName() );
  final SubGraphImplementor<S> subGraph = type.makeSubGraph();
  internalAddSubGraph( type.getJavaType(), subGraph );
  return subGraph;
}

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

public static void processIdentifierGeneratorDefinition(
      HbmLocalMetadataBuildingContext context,
      JaxbHbmIdentifierGeneratorDefinitionType identifierGenerator) {
    log.debugf( "Processing <identifier-generator/> : %s", identifierGenerator.getName() );

    context.getMetadataCollector().addIdentifierGenerator(
        new IdentifierGeneratorDefinition(
            identifierGenerator.getName(),
            identifierGenerator.getClazz()
        )
    );
  }
}

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

@Override
  protected void finishSubGraph() {
    final GraphImplementor<?> popped = graphStack.pop();

    if ( PARSING_LOGGER.isDebugEnabled() ) {
      PARSING_LOGGER.debugf(
          "%s Finished graph : %s",
          StringHelper.repeat( "<<", attributeNodeStack.depth() + 2 ),
          popped.getGraphedType().getName()
      );
    }
  }
}

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

private void handleElements(FromReferenceNode collectionNode, String propertyName) {
  FromElement collectionFromElement = collectionNode.getFromElement();
  QueryableCollection queryableCollection = collectionFromElement.getQueryableCollection();
  String path = collectionNode.getPath() + "[]." + propertyName;
  LOG.debugf( "Creating elements for %s", path );
  fromElement = collectionFromElement;
  if ( !collectionFromElement.isCollectionOfValuesOrComponents() ) {
    getWalker().addQuerySpaces( queryableCollection.getElementPersister().getQuerySpaces() );
  }
  setDataType( queryableCollection.getElementType() );
  selectColumns = collectionFromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect );
}

相关文章