本文整理汇总了Java中org.apache.jena.atlas.logging.Log.error方法的典型用法代码示例。如果您正苦于以下问题:Java Log.error方法的具体用法?Java Log.error怎么用?Java Log.error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jena.atlas.logging.Log
的用法示例。
在下文中一共展示了Log.error方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scanDirectory
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
/**
* Scan a directory for datasource areas.
* These must have a file called source.cfg.
*/
public static Pair<List<Path>/*enabled*/, List<Path>/*disabled*/> scanDirectory(Location serverRoot) {
Path dir = IOX.asPath(serverRoot);
try {
List<Path> directory = ListUtils.toList( Files.list(dir).filter(p->Files.isDirectory(p)).sorted() );
// directory.stream()
// .filter(LocalServer::isFormattedDataSource)
// .collect(Collectors.toList());
List<Path> enabled = directory.stream()
.filter(path -> isEnabled(path))
.collect(Collectors.toList());
List<Path> disabled = directory.stream()
.filter(path -> !isEnabled(path))
.collect(Collectors.toList());
return Pair.create(enabled, disabled);
}
catch (IOException ex) {
Log.error(Cfg.class, "Exception while reading "+dir);
throw IOX.exception(ex);
}
}
示例2: register
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
@Override
final
public RegToken register(Id clientId) {
// Aligned to DeltaLinkHTTP behaviour for testing purpoes.
// Allow multiple registrations.
// It has the effect of swapping the valid RegToken, hence link a client restart
// XXX Rework later.
if ( false && isRegistered() ) {
if ( this.clientId.equals(clientId) ) {
Log.warn(this, "Already registered: "+clientId);
return regToken;
} else {
Log.error(this, "Already registered under a different clientId: "+clientId);
throw new DeltaBadRequestException("Already registered under a different clientId");
}
}
this.clientId = clientId;
regToken = linkMgr.register(clientId);
return regToken;
}
示例3: register
import org.apache.jena.atlas.logging.Log; //导入方法依赖的package包/类
public static void register(PatchStore impl) {
String providerName = impl.getProviderName();
FmtLog.info(LOG, "Register patch store: %s", providerName);
if ( patchStores.containsKey(providerName) )
Log.error(PatchStore.class, "Already registered: "+providerName);
patchStores.put(providerName, impl);
}