本文整理了Java中org.apache.felix.framework.Logger.log()
方法的一些代码示例,展示了Logger.log()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()
方法的具体详情如下:
包路径:org.apache.felix.framework.Logger
类名称:Logger
方法名:log
暂无
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
private void log(int flag, String msg, Throwable th)
{
if (m_logger == null)
{
System.out.println(msg + ": " + th);
}
else
{
m_logger.log(flag, msg, th);
}
}
代码示例来源:origin: jawi/ols
private Bundle installBundle( final BundleContext context, final String plugin )
{
this.fwLogger.log( LogService.LOG_DEBUG, "Installing plugin: '" + plugin + "'..." );
try
{
return context.installBundle( plugin );
}
catch ( BundleException exception )
{
this.fwLogger.log( LogService.LOG_WARNING, "Failed to install bundle: " + plugin + "...", exception );
return null;
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.launchpad.base
@Override
public StartupListener addingService(final ServiceReference<StartupListener> reference) {
final StartupListener listener = context.getService(reference);
if (listener != null) {
try {
listener.inform(startupMode, finished.get());
} catch (final Throwable t) {
logger.log(Logger.LOG_ERROR, "Error calling StartupListener " + listener, t);
}
}
return listener;
}
});
代码示例来源:origin: apache/felix
void setPersistentStateInactive()
{
try
{
m_archive.setPersistentState(Bundle.INSTALLED);
}
catch (Exception ex)
{
getFramework().getLogger().log(this, Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: orbisgis/orbisgis
/**
* Start the Framework
*/
public void start() {
try {
framework.start();
openTrackers();
} catch(BundleException ex) {
LOGGER.log(Logger.LOG_ERROR, ex.getLocalizedMessage(), ex);
}
}
private void openTrackers() {
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
void setPersistentStateInactive()
{
try
{
m_archive.setPersistentState(Bundle.INSTALLED);
}
catch (Exception ex)
{
getFramework().getLogger().log(Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
public ServiceReference getServiceReference(String clazz)
{
checkValidity();
try
{
ServiceReference[] refs = getServiceReferences(clazz, null);
return getBestServiceReference(refs);
}
catch (InvalidSyntaxException ex)
{
m_logger.log(Logger.LOG_ERROR, "BundleContextImpl: " + ex);
}
return null;
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
int getStartLevel(int defaultLevel)
{
try
{
return m_archive.getStartLevel();
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error reading start level from bundle archive.",
ex);
return defaultLevel;
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
void setPersistentStateActive()
{
try
{
m_archive.setPersistentState(Bundle.ACTIVE);
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
void setLastModified(long l)
{
try
{
m_archive.setLastModified(l);
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error writing last modification time to bundle archive.",
ex);
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
void setPersistentStateUninstalled()
{
try
{
m_archive.setPersistentState(Bundle.UNINSTALLED);
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
void setStartLevel(int i)
{
try
{
m_archive.setStartLevel(i);
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error writing start level to bundle archive.",
ex);
}
}
代码示例来源:origin: apache/felix
void setLastModified(long l)
{
try
{
m_archive.setLastModified(l);
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Error writing last modification time to bundle archive.",
ex);
}
}
代码示例来源:origin: apache/felix
void setPersistentStateActive()
{
try
{
m_archive.setPersistentState(Bundle.ACTIVE);
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
String _getLocation()
{
try
{
return m_archive.getLocation();
}
catch (Exception ex)
{
getFramework().getLogger().log(
Logger.LOG_ERROR,
"Error getting location from bundle archive.",
ex);
return null;
}
}
代码示例来源:origin: apache/felix
String _getLocation()
{
try
{
return m_archive.getLocation();
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Error getting location from bundle archive.",
ex);
return null;
}
}
代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main
protected File getDataFile(BundleImpl bundle, String s)
{
try
{
if (bundle == this)
{
return m_cache.getSystemBundleDataFile(s);
}
return m_cache.getArchive(bundle.getBundleId()).getDataFile(s);
}
catch (Exception ex)
{
m_logger.log(Logger.LOG_ERROR, ex.getMessage());
return null;
}
}
代码示例来源:origin: apache/felix
void setPersistentStateUninstalled()
{
try
{
m_archive.setPersistentState(Bundle.UNINSTALLED);
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Error writing persistent state to bundle archive.",
ex);
}
}
代码示例来源:origin: apache/felix
void setStartLevel(int i)
{
try
{
m_archive.setStartLevel(i);
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Error writing start level to bundle archive.",
ex);
}
}
代码示例来源:origin: apache/felix
synchronized void close()
{
closeRevisions();
try
{
m_archive.close();
}
catch (Exception ex)
{
getFramework().getLogger().log(
this,
Logger.LOG_ERROR,
"Unable to close archive revisions.", ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!