org.apache.felix.framework.Logger.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(452)

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

Logger.<init>介绍

暂无

代码示例

代码示例来源:origin: jawi/ols

private Map<String, Object> createConfig()
{
 this.fwLogger = new Logger();
 this.fwLogger.setLogger( this );
 final String logLevel = "" + Math.min( 4, this.options.logLevel );
 final Map<String, Object> config = new HashMap<String, Object>();
 config.put( Constants.FRAMEWORK_BOOTDELEGATION, "com.yourkit.*,com.sun.*,sun.*,apple.*,com.apple.*" );
 config.put( Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA,
   "com.apple.mrj,com.apple.eawt,javax.swing,javax.media.jai,org.osgi.service.cm" );
 // Issue #36: explicitly set the location to the bundle cache directory,
 // otherwise it is created /relatively/ to the current working directory,
 // which is problematic when you start the client with a relative path...
 config.put( Constants.FRAMEWORK_STORAGE, this.options.cacheDir.getPath() );
 if ( this.options.cleanCache )
 {
  config.put( Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT );
 }
 // Felix specific configuration options...
 config.put( FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, Arrays.asList( new HostActivator() ) );
 config.put( FelixConstants.LOG_LEVEL_PROP, logLevel );
 config.put( FelixConstants.LOG_LOGGER_PROP, this.fwLogger );
 config.put( "nl.lxtreme.ols.config.dir", this.options.pluginDir.getAbsolutePath() );
 return config;
}

代码示例来源:origin: orbisgis/orbisgis

/**
 * Create minimal resource inside an empty workspace folder
 * @param workspaceFolder
 * @param version_major
 * @param version_minor
 * @param version_revision
 * @param version_qualifier
 * @throws IOException Error while writing files or the folder is not empty
 */
public static void initWorkspaceFolder(File workspaceFolder, int version_major, int version_minor,
                    int version_revision, String version_qualifier) throws IOException {
  if(!workspaceFolder.exists()) {
    if(!workspaceFolder.mkdirs()) {
      throw new IOException("Cannot create workspace directory");
    }
  }
  File[] files = workspaceFolder.listFiles();
  if (files != null && files.length != 0) {
    // This method must be called with empty folder only
    throw new IOException("Workspace folder must be empty");
  }
  CoreWorkspaceImpl coreWorspace = new CoreWorkspaceImpl(version_major, version_minor, version_revision,
      version_qualifier, new Logger());
  coreWorspace.setWorkspaceFolder(workspaceFolder.getAbsolutePath());
  coreWorspace.writeVersionFile();
  coreWorspace.writeUriFile();
}

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

Logger logger = new Logger();
logger.setLogLevel(Logger.LOG_ERROR);

代码示例来源:origin: org.orbisgis/orbisgis-core

org.apache.felix.framework.Logger logger = new org.apache.felix.framework.Logger();

代码示例来源:origin: orbisgis/orbisgis

org.apache.felix.framework.Logger logger = new org.apache.felix.framework.Logger();

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

m_logger = new Logger();

代码示例来源:origin: apache/felix

m_logger = new Logger();

代码示例来源:origin: orbisgis/orbisgis

public ViewWorkspaceImpl askWorkspaceFolder(Window parentComponent, ProgressMonitor pm) {
  CoreWorkspaceImpl coreWorkspace = new CoreWorkspaceImpl(bundleVersion.getMajor(), bundleVersion.getMinor(),
      bundleVersion.getMicro(), bundleVersion.getQualifier(), new org.apache.felix.framework.Logger());
  String errorMessage = "";
  try {
    do {
      if (WorkspaceSelectionDialog.showWorkspaceFolderSelection(parentComponent, coreWorkspace, errorMessage)) {
        /////////////////////
        // Check connection
        dataSourceService.setCoreWorkspace(coreWorkspace);
        try {
          dataSourceService.activate();
          pm.setTaskName(I18N.tr("Connecting to the database.."));
          try (Connection connection = dataSourceService.getConnection()) {
            DatabaseMetaData meta = connection.getMetaData();
            LOGGER.info(I18N.tr("Data source available {0} version {1}", meta.getDriverName(), meta.getDriverVersion()));
            return new ViewWorkspaceImpl(coreWorkspace);
          }
        } catch (SQLException ex) {
          errorMessage = ex.getLocalizedMessage();
        }
      } else {
        // User cancel, stop OrbisGIS
        return null;
      }
    } while (true);
  } finally {
    pm.endTask();
  }
}

代码示例来源:origin: orbisgis/orbisgis

coreWorkspace.getVersionRevision(), coreWorkspace.getVersionQualifier(), new org.apache.felix
.framework.Logger());

代码示例来源:origin: ops4j/org.ops4j.pax.runner

final EventDispatcher dispatcher = EventDispatcher.start( new Logger( Logger.LOG_DEBUG ) );
serviceRegistry.addServiceListener( new ServiceListener()

相关文章