我已经开发出基于SocketBase的锁定,并且如果我部署karaf Non-Docker环境,则可以完美地工作,但是当我在docker中尝试此操作时,它什么也没有显示。如果我以调试模式启动,那么以下行未打印
Jun 28, 2018 11:33:56 AM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Jun 28, 2018 11:33:56 AM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
2018-06-28T11:33:57,166 | DEBUG | FelixStartLevel | core | 10 - org.apache.karaf.features.core - 4.1.5 | BundleEvent STARTED - org.apach
e.karaf.features.core
2018-06-28T11:33:57,181 | DEBUG | FelixDispatchQueue | Main | - - | Start level change complete.
2018-06-28T11:33:57,182 | DEBUG | FelixDispatchQueue | framework | 0 - org.apache.felix.framework - 5.6.10 | FrameworkEvent STARTLEVEL CHANGED
- org.apache.felix.framework
2018-06-28T11:33:57,516 | DEBUG | CM Configuration Updater (Update: pid=org.ops4j.pax.url.mvn) | mvn | 4 - org.ops4j.pax.url.mvn - 2.5.4
| ServiceEvent REGISTERED - [org.ops4j.pax.url.mvn.MavenResolver] - org.ops4j.pax.url.mvn
2018-06-28T11:33:57,520 | DEBUG | CM Configuration Updater (Update: pid=org.ops4j.pax.url.mvn) | mvn | 4 - org.ops4j.pax.url.mvn - 2.5.4
| ServiceEvent REGISTERED - [org.osgi.service.url.URLStreamHandlerService] - org.ops4j.pax.url.mvn
2018-06-28T11:33:57,532 | DEBUG | pool-2-thread-2 | core | 10 - org.apache.karaf.features.core - 4.1.5 | ServiceEvent REGISTERED - [org.
osgi.framework.hooks.resolver.ResolverHookFactory] - org.apache.karaf.features.core
2018-06-28T11:33:57,536 | DEBUG | pool-2-thread-2 | core | 10 - org.apache.karaf.features.core - 4.1.5 | ServiceEvent REGISTERED - [org.
osgi.framework.hooks.bundle.CollisionHook] - org.apache.karaf.features.core
非Docker部署的调试日志
LoggerFactory
以下是在Docker中启动karaf时的日志
public class MyDbContext : DbContext
{
public MyDbContext(DbContextOptions<MyDbContext> options, ILoggerFactory loggerFactory = null)
{
LoggerFactory = loggerFactory;
}
public ILoggerFactory LoggerFactory { get; }
}
答案 0 :(得分:0)
我的自定义锁代码由于未启用karaf锁而引发一些错误 工作,我只是尝试捕获异常,现在它的工作。