本文整理了Java中org.jboss.logging.Logger.infov()
方法的一些代码示例,展示了Logger.infov()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.infov()
方法的具体详情如下:
包路径:org.jboss.logging.Logger
类名称:Logger
方法名:infov
[英]Issue a log message with a level of INFO using java.text.MessageFormat-style formatting.
[中]使用java发出具有信息级别的日志消息。文本MessageFormat样式格式化。
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testLifecycle() {
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = new Person( 1L );
person.getPhones().add( new Phone( 1L, "landline", "028-234-9876" ) );
person.getPhones().add( new Phone( 2L, "mobile", "072-122-9876" ) );
entityManager.persist( person );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 2, phones.size() );
phones.stream().forEach( phone -> log.infov( "Phone number %s", phone.getNumber() ) );
phones.remove( phones.iterator().next() );
Assert.assertEquals( 1, phones.size() );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 1, phones.size() );
} );
}
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testLifecycle() {
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = new Person( 1L );
person.getPhones().add( new Phone( 1L, "landline", "028-234-9876" ) );
person.getPhones().add( new Phone( 2L, "mobile", "072-122-9876" ) );
entityManager.persist( person );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 2, phones.size() );
phones.stream().forEach( phone -> log.infov( "Phone number %s", phone.getNumber() ) );
phones.remove( phones.iterator().next() );
Assert.assertEquals( 1, phones.size() );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 1, phones.size() );
} );
}
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testLifecycle() {
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = new Person( 1L );
entityManager.persist( person );
person.addPhone( new Phone( 1L, "landline", "028-234-9876" ) );
person.addPhone( new Phone( 2L, "mobile", "072-122-9876" ) );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 2, phones.size() );
phones.stream().forEach( phone -> log.infov( "Phone number %s", phone.getNumber() ) );
person.removePhone( phones.iterator().next() );
Assert.assertEquals( 1, phones.size() );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 1, phones.size() );
} );
}
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testLifecycle() {
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = new Person( 1L );
entityManager.persist( person );
person.addPhone( new Phone( 1L, "landline", "028-234-9876" ) );
person.addPhone( new Phone( 2L, "mobile", "072-122-9876" ) );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 2, phones.size() );
phones.stream().forEach( phone -> log.infov( "Phone number %s", phone.getNumber() ) );
person.removePhone( phones.iterator().next() );
Assert.assertEquals( 1, phones.size() );
} );
doInJPA( this::entityManagerFactory, entityManager -> {
Person person = entityManager.find( Person.class, 1L );
Set<Phone> phones = person.getPhones();
Assert.assertEquals( 1, phones.size() );
} );
}
代码示例来源:origin: resteasy/Resteasy
public void registerLocalProviderInstance(Object provider, Map<Class<?>, Integer> contracts) {
for (Object registered : getLocalProviderInstances()) {
if (registered == provider) {
LOG.infov("Provider already registered {0}", provider.getClass().getName());
return;
}
}
localProviderInstances.add(provider);
configurationWrapper.registerLocalContract(provider.getClass(), contracts);
}
代码示例来源:origin: org.jboss.resteasy/resteasy-client-microprofile
public void registerLocalProviderInstance(Object provider, Map<Class<?>, Integer> contracts) {
for (Object registered : getLocalProviderInstances()) {
if (registered == provider) {
LOG.infov("Provider already registered {0}", provider.getClass().getName());
return;
}
}
localProviderInstances.add(provider);
configurationWrapper.registerLocalContract(provider.getClass(), contracts);
}
代码示例来源:origin: org.jboss.weld.se/weld-se
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: weld/core
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: org.jboss.weld.environment/weld-environment-common
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: weld/core
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: weld/core
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded
logger.infov("Unable to adapt URL: {0}, using its external form instead", url);
ref = url.toExternalForm();
代码示例来源:origin: org.wildfly/wildfly-testsuite-shared
/**
* Reverts configuration changes done by {@link #setup(ModelControllerClient)} method - i.e. calls {@link ConfigurableElement#remove(CLIWrapper)} method
* on instances provided by {@link #getConfigurableElements()} (in reverse order).
*/
protected void tearDown(ModelControllerClient modelControllerClient) throws Exception {
if (configurableElements == null || configurableElements.length == 0) {
LOGGER.warn("Empty Elytron configuration.");
return;
}
try (CLIWrapper cli = new CLIWrapper(true)) {
final ListIterator<ConfigurableElement> reverseConfigIt = Arrays.asList(configurableElements)
.listIterator(configurableElements.length);
while (reverseConfigIt.hasPrevious()) {
final ConfigurableElement configurableElement = reverseConfigIt.previous();
LOGGER.infov("Removing element {0} ({1})", configurableElement.getName(),
configurableElement.getClass().getSimpleName());
configurableElement.remove(modelControllerClient, cli);
}
}
this.configurableElements = null;
ServerReload.reloadIfRequired(modelControllerClient);
}
代码示例来源:origin: weld/core
logger.infov("Unable to adapt JAR file URL: {0}, using its external form instead", path);
return fallback.toExternalForm();
代码示例来源:origin: weld/core
logger.infov("Unable to adapt JAR file URL: {0}, using its external form instead", path);
return fallback.toExternalForm();
代码示例来源:origin: org.wildfly/wildfly-testsuite-shared
/**
* Creates configuration elements (provided by implementation of {@link #getConfigurableElements()} method) and calls
* {@link ConfigurableElement#create(CLIWrapper)} for them.
*/
protected void setup(final ModelControllerClient modelControllerClient) throws Exception {
configurableElements = getConfigurableElements();
if (configurableElements == null || configurableElements.length == 0) {
LOGGER.warn("Empty Elytron configuration.");
return;
}
try (CLIWrapper cli = new CLIWrapper(true)) {
for (final ConfigurableElement configurableElement : configurableElements) {
LOGGER.infov("Adding element {0} ({1})", configurableElement.getName(),
configurableElement.getClass().getSimpleName());
configurableElement.create(modelControllerClient, cli);
}
}
ServerReload.reloadIfRequired(modelControllerClient);
}
代码示例来源:origin: org.keycloak/keycloak-wildfly-server-subsystem
@Override
public void undeploy(DeploymentUnit context) {
ProviderManager pm = context.getAttachment(ATTACHMENT_KEY);
if (pm != null) {
logger.infov("Undeploying Keycloak provider: {0}", context.getName());
ProviderManagerRegistry.SINGLETON.undeploy(pm);
context.removeAttachment(ATTACHMENT_KEY);
}
}
}
代码示例来源:origin: org.keycloak/keycloak-saml-wildfly-adapter
private static void addSsoCacheCrossDcListener(Cache<String, String[]> ssoCache, SsoSessionCacheListener listener) {
if (ssoCache.getCacheConfiguration().persistence() == null) {
return;
}
final Set<RemoteStore> stores = getRemoteStores(ssoCache);
if (stores == null || stores.isEmpty()) {
return;
}
LOG.infov("Listening for events on remote stores configured for cache {0}", ssoCache.getName());
for (RemoteStore store : stores) {
store.getRemoteCache().addClientListener(listener);
}
}
代码示例来源:origin: org.keycloak/keycloak-wildfly-server-subsystem
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
KeycloakAdapterConfigService config = KeycloakAdapterConfigService.INSTANCE;
String deploymentName = deploymentUnit.getName();
if (config.isKeycloakServerDeployment(deploymentName)) {
return;
}
KeycloakDeploymentInfo info = KeycloakProviderDependencyProcessor.getKeycloakProviderDeploymentInfo(deploymentUnit);
if (info.isProvider()) {
logger.infov("Deploying Keycloak provider: {0}", deploymentUnit.getName());
final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
ProviderManager pm = new ProviderManager(info, module.getClassLoader());
ProviderManagerRegistry.SINGLETON.deploy(pm);
deploymentUnit.putAttachment(ATTACHMENT_KEY, pm);
}
}
内容来源于网络,如有侵权,请联系作者删除!