• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LogLevelOption类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.ops4j.pax.exam.karaf.options.LogLevelOption的典型用法代码示例。如果您正苦于以下问题:Java LogLevelOption类的具体用法?Java LogLevelOption怎么用?Java LogLevelOption使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LogLevelOption类属于org.ops4j.pax.exam.karaf.options包,在下文中一共展示了LogLevelOption类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configuration

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    replaceConfigurationFile(CONFIG_PROPERTIES,
                            new File("src/test/resources/etc/config.properties")),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(OSGIFX_BOOT_ARTIFACT_ID)
                            .versionAsInProject(),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(IT_DUMMY_BUNDLE_ARTIFACT_ID)
                            .versionAsInProject(),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_CORE_ARTIFACT_ID, TESTFX_VERSION),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_INTERNAL_ARTIFACT_ID, TESTFX_VERSION),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:25,代码来源:TFxTest.java


示例2: configuration

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception {
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    mavenBundle()
                            .groupId(OSGIFX_GROUP_ID)
                            .artifactId(OSGIFX_BOOT_ARTIFACT_ID)
                            .versionAsInProject(),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:17,代码来源:DeployOsgiFxTest.java


示例3: configuration

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public static Option[] configuration() throws Exception
{
    return new Option[]
            {
                    karafDistributionConfiguration()
                            .frameworkUrl(KARAF_URL)
                            .unpackDirectory(new File("target/paxexam/unpack")),
                    replaceConfigurationFile(BUNDLE_INSTALL_ACL_CFG,
                            new File("src/test/resources/etc/bundleinstall.cfg")),
                    replaceConfigurationFile(CONFIG_PROPERTIES,
                            new File("src/test/resources/etc/config.properties")),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_CORE_ARTIFACT_ID, TESTFX_VERSION),
                    mavenBundle(TESTFX_GROUP_ID, TESTFX_INTERNAL_ARTIFACT_ID, TESTFX_VERSION),
                    logLevel(LogLevelOption.LogLevel.INFO)
            };
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:18,代码来源:OsgiFxFailureTest.java


示例4: configure

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public Option[] configure() {
    final String jvmOptions = StringUtils.defaultIfBlank(System.getProperty("jvm.options"), "-Dnoop");
    final String karafVersion = System.getProperty("karaf.version", DEFAULT_KARAF_VERSION);
    final String projectVersion = System.getProperty("project.version");
    return options(
            karafDistributionConfiguration()
                    .frameworkUrl(maven("org.apache.karaf", "apache-karaf", karafVersion).type("tar.gz"))
                    .unpackDirectory(new File("target/karaf")),
            vmOption(jvmOptions),
            configureConsole()
                    .startRemoteShell()
                    .ignoreLocalConsole(),

            features(maven("org.microbule", "microbule-features", projectVersion).type("xml").classifier("features"), "microbule"),
            junitBundles(),
            keepRuntimeFolder(),
            logLevel(LogLevelOption.LogLevel.WARN));
}
 
开发者ID:Microbule,项目名称:microbule,代码行数:20,代码来源:KarafFeaturesIT.java


示例5: configure

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public static Option[] configure() {
    return OptionUtils.combine(
            CommonKarafOptions.get(),
            getKarafDistributionOption(),

            keepRuntimeFolder(),
            logLevel(LogLevelOption.LogLevel.INFO),

            // Option to be used to do remote debugging
            //debugConfiguration("5005", true),

            // Load camel-core, camel-spring, camel-test & camel-cxf Features
            loadCamelFeatures("camel-cxf"), loadDroolsRepo(),
            // Load drools-module (= core + compiler + knowledge), kie-camel & kie-spring
            loadDroolsFeatures("kie-spring", "kie-camel")
    );
}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:19,代码来源:DroolsOnBodyCamelKarafIntegrationTest.java


示例6: config

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public Option[] config() throws URISyntaxException, MalformedURLException {
    MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject().type("tar.gz");
    return new Option[]{
            karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
            configureSecurity().disableKarafMBeanServerBuilder(),
            features(getFeaturesFile().toURL().toString(), "scr", "docker-client"),
            editConfigurationFileExtend("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories", "file:"+System.getProperty("features.repo")+"@[email protected]"),
            keepRuntimeFolder(),
            logLevel(LogLevelOption.LogLevel.DEBUG),
    };
}
 
开发者ID:fabric8io,项目名称:docker-client,代码行数:13,代码来源:ServiceTest.java


示例7: config

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public Option[] config() {
    MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject().type("tar.gz");
    return new Option[]{
            karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
            configureSecurity().disableKarafMBeanServerBuilder(),
            keepRuntimeFolder(),
            editConfigurationFilePut("etc/system.properties", "features.xml", System.getProperty("features.xml")),
            editConfigurationFileExtend("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories", "file:"+System.getProperty("features.repo")+"@[email protected]"),
            logLevel(LogLevelOption.LogLevel.INFO),
    };
}
 
开发者ID:fabric8io,项目名称:docker-client,代码行数:13,代码来源:FeatureInstallationTest.java


示例8: config

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public Option[] config() {
    MavenUrlReference fuseDistro = maven()
            .groupId("org.jboss.fuse").artifactId("jboss-fuse-karaf-minimal")
            .type("zip").versionAsInProject();

    return options(
            karafDistributionConfiguration().frameworkUrl(fuseDistro),
            configureConsole().ignoreRemoteShell().ignoreLocalConsole(),
            systemTimeout(60000),
            vmOptions("-Dprop=CS:key"),
            logLevel(LogLevelOption.LogLevel.WARN)
    );
}
 
开发者ID:jboss-fuse,项目名称:fuse-karaf,代码行数:15,代码来源:CredentialStoreStartupFailureIntegrationTest.java


示例9: setupContainer

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
protected Option[] setupContainer() {
    MavenArtifactUrlReference karafUrl = maven()
            .groupId(KARAF_GROUP_ID)
            .artifactId(KARAF_ARTIFACT_ID)
            .version(KARAF_VERSION)
            .type("zip");

    MavenUrlReference paxJdbcFeaturesRepo = maven()
            .groupId(PAXJDBC_FEATURES_GROUP_ID)
            .artifactId(PAXJDBC_FEATURE)
            .classifier("features")
            .type("xml")
            .version(PAX_JDBC_VERSION);
    //.versionAsInProject(); //this is not working ???

    File jdbcConfigFile = new File("src/test/resources/demodbDS.properties");

    //Setup pax-jdbc datasource
    Option[] configOptions = editConfigurationFilePut("etc/org.ops4j.datasource-demodbDS.cfg", jdbcConfigFile);

    Option[] baseOptions = options(karafDistributionConfiguration()
                    .frameworkUrl(karafUrl)
                    .unpackDirectory(new File("target/exam"))
                    .useDeployFolder(false)
                    .karafVersion(KARAF_VERSION)
                    .name("Apache Karaf"),
            configureConsole().ignoreLocalConsole(),
            logLevel(LogLevelOption.LogLevel.INFO),
            keepRuntimeFolder(),
            //Features
            features(paxJdbcFeaturesRepo, "transaction", "jndi", "pax-jdbc-config", "pax-jdbc-h2")
    );

    return combine(configOptions, baseOptions);
}
 
开发者ID:kameshsampath,项目名称:mybatis-osgi,代码行数:36,代码来源:KarafTestSupport.java


示例10: config

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public Option[] config() {
    return new Option[]{
            // setup which karaf server we are using
            karafDistributionConfiguration()
                    .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").version("4.1.2").type("tar.gz"))
                    .karafVersion("4.1.3")
                    .name("Apache Karaf")
                    .useDeployFolder(false)
                    .unpackDirectory(new File("target/karaf")),

            // keep the folder so we can look inside when something fails, eg check the data/logs directory
            keepRuntimeFolder(),

            // Disable the SSH port
            configureConsole().ignoreRemoteShell(),

            // Configure Logging to not be verbose, if you set to DEBUG you see a lot of details
            logLevel(LogLevelOption.LogLevel.WARN),

            // Install JUnit
            junitBundles(),

            // Install base camel features
            features(getCamelKarafFeatureUrl(), "camel", "camel-test"),

            // and use camel-http for testing
            features(getCamelKarafFeatureUrl(), "camel-http4"),

            // install our example feature
            features(maven().groupId("com.camelinaction").artifactId("chapter9-pax-exam").version("2.0.0").classifier("features").type("xml"), "camel-quote")
    };
}
 
开发者ID:camelinaction,项目名称:camelinaction2,代码行数:34,代码来源:PaxExamIT.java


示例11: baseConfig

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
/**
 * Base configuration for a Karaf container running the specified Ignite features.
 *
 * @return The configuration.
 */
public Option[] baseConfig() {
    return options(

        // Specify which version of Karaf to use.
        karafDistributionConfiguration()
            .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz")
                .versionAsInProject())
            .karafVersion(System.getProperty("karafVersion"))
            .useDeployFolder(false)
            .unpackDirectory(new File("target/paxexam/unpack")),

        // Add JUnit bundles.
        junitBundles(),

        // Add the additional JRE exports that Ignite requires.
        editConfigurationFileExtend("etc/jre.properties", "jre-1.7", "sun.nio.ch"),
        editConfigurationFileExtend("etc/jre.properties", "jre-1.8", "sun.nio.ch"),

        // Make log level INFO.
        logLevel(LogLevelOption.LogLevel.INFO),

        // Add our features repository.
        features(mavenBundle()
                .groupId("org.apache.ignite").artifactId("ignite-osgi-karaf")
                .version(System.getProperty("projectVersion")).type("xml/features"),
            featuresToInstall().toArray(new String[0])),

        // Propagate the projectVersion system property.
        systemProperty("projectVersion").value(System.getProperty("projectVersion"))
    );
}
 
开发者ID:apache,项目名称:ignite,代码行数:37,代码来源:AbstractIgniteKarafTest.java


示例12: configure

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
public static Option[] configure(String... features) {

      ArrayList<String> f = new ArrayList<>();
      f.addAll(Arrays.asList(features));

      Option[] options = new Option[]{karafDistributionConfiguration().frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject()).unpackDirectory(new File("target/paxexam/unpack/")),

         KarafDistributionOption.keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.INFO), editConfigurationFilePut("etc/config.properties", "karaf.startlevel.bundle", "50"),
         // uncomment this to debug it.
         // debugConfiguration("5005", true),
         features(getArtemisMQKarafFeatureUrl(), f.toArray(new String[f.size()]))};

      return options;
   }
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:ArtemisFeatureTest.java


示例13: getLoggingOption

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Override
public Option getLoggingOption() {
    return composite(
            editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
                    "log4j.logger.org.opendaylight.ovsdb",
                    LogLevelOption.LogLevel.TRACE.name()),
            super.getLoggingOption());
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:9,代码来源:SouthboundIT.java


示例14: getLoggingOption

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Override
public Option getLoggingOption() {
    Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
            logConfiguration(getClass()),
            LogLevelOption.LogLevel.INFO.name());
    option = composite(option, super.getLoggingOption());
    return option;
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:9,代码来源:LibraryIntegrationTestBase.java


示例15: configure

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
@Configuration
public static Option[] configure() {
    return OptionUtils.combine(new Option[]{
            getKarafDistributionOption(),

            keepRuntimeFolder(),
            logLevel(LogLevelOption.LogLevel.INFO),

            // Load camel-core, camel-spring, camel-test & camel-cxf Features
            loadCamelFeatures("camel-cxf"), loadDroolsRepo(),

            // Load drools-module (= core + compiler + knowledge), kie-camel & kie-spring
            loadDroolsFeatures("kie-spring", "kie-camel")
    });
}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:16,代码来源:DroolsOnCommandCamelKarafIntegrationTest.java


示例16: configure

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
public static Option[] configure(String... extra) {

        List<String> camel = new ArrayList<>();
        camel.add("camel");
        if (extra != null && extra.length > 0) {
            for (String e : extra) {
                camel.add(e);
            }
        }
        final String[] camelFeatures = camel.toArray(new String[camel.size()]);

        switchPlatformEncodingToUTF8();
        String karafVersion = getKarafVersion();
        LOG.info("*** Apache Karaf version is " + karafVersion + " ***");

        Option[] options = new Option[]{
            // for remote debugging
            //org.ops4j.pax.exam.CoreOptions.vmOption("-Xdebug"),
            //org.ops4j.pax.exam.CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5008"),

            KarafDistributionOption.karafDistributionConfiguration()
                    .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
                    .karafVersion(karafVersion)
                    .name("Apache Karaf")
                    .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/")),
            logLevel(LogLevelOption.LogLevel.INFO),

            // keep the folder so we can look inside when something fails
            keepRuntimeFolder(),

            // Disable the SSH port
            configureConsole().ignoreRemoteShell(),

            // need to modify the jre.properties to export some com.sun packages that some features rely on
//            KarafDistributionOption.replaceConfigurationFile("etc/jre.properties", new File("src/test/resources/jre.properties")),

            vmOption("-Dfile.encoding=UTF-8"),

            // Disable the Karaf shutdown port
            editConfigurationFilePut("etc/custom.properties", "karaf.shutdown.port", "-1"),

            // Assign unique ports for Karaf
//            editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", Integer.toString(AvailablePortFinder.getNextAvailable())),
//            editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", Integer.toString(AvailablePortFinder.getNextAvailable())),
//            editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", Integer.toString(AvailablePortFinder.getNextAvailable())),

            // install junit
            CoreOptions.junitBundles(),

            // install camel
            features(getCamelKarafFeatureUrl(), camelFeatures),

            // install camel-test-karaf as bundle (not feature as the feature causes a bundle refresh that invalidates the @Inject bundleContext)
            mavenBundle().groupId("org.apache.camel").artifactId("camel-test-karaf").versionAsInProject()
        };

        return options;
    }
 
开发者ID:HydAu,项目名称:Camel,代码行数:59,代码来源:AbstractFeatureTest.java


示例17: karafConfiguration

import org.ops4j.pax.exam.karaf.options.LogLevelOption; //导入依赖的package包/类
public static Option[] karafConfiguration() {
    
    List<Option> options = new ArrayList<Option>();
    
    options.add(getKarafDistributionOption());
    
    /* Set maximal perm space size */
    if (System.getProperty(PROP_KARAF_MAXPERMSIZE) != null) {
        options.add(vmOption("-XX:MaxPermSize=" + System.getProperty(PROP_KARAF_MAXPERMSIZE)));
    }
    
    // It is really nice if the container sticks around after the test so you can check the contents
    // of the data directory when things go wrong.
    if (System.getProperty(PROP_KEEP_RUNTIME_FOLDER) != null) {
        options.add(keepRuntimeFolder());
    }
    
    // Don't bother with local console output as it just ends up cluttering the logs
    options.add(configureConsole().ignoreLocalConsole());
    
    // Force the log level to INFO so we have more details during the test.  It defaults to WARN.
    options.add(logLevel(LogLevelOption.LogLevel.INFO));
    
    String droolsClassifier = System.getProperty(DROOLS_KARAF_FEATURES_CLASSIFIER) != null ? System.getProperty(DROOLS_KARAF_FEATURES_CLASSIFIER) : "features";
    
    options.add(features(maven().groupId(DROOLS_FEATURE_GROUP_ID).artifactId(DROOLS_FEATURE_ARTIFACT_ID)
                                    .versionAsInProject().type("xml").classifier(droolsClassifier),
                            JNDI_FEATURE_NAME, H2_FEATURE_NAME, HIBERNATE_FEATURE_NAME, KIE_CI_FEATURE_NAME,
                            JBPM_FEATURE_NAME, DROOLS_DT_FEATURE_NAME, KIE_SPRING_FEATURE_NAME,
                            KIE_ARIES_BLUEPRINT_FEATURE_NAME));
    options.add(features(maven().groupId(INTEG_PACK_FEATURE_GROUP_ID).artifactId(INTEG_PACK_FEATURE_ARTIFACT_ID)
                                    .versionAsInProject().type("xml").classifier("features"),
                            KIE_CAMEL_FEATURE_NAME, CAMEL_WORKITEM_FEATURE_NAME));
    
    if (Boolean.parseBoolean(System.getProperty(PROP_INSTALL_CAMEL, "true"))) {
        options.add(features(maven().groupId(CAMEL_FEATURE_GROUP_ID).artifactId(CAMEL_FEATURE_ARTIFACT_ID)
                    .versionAsInProject().type("xml").classifier("features"),
                CAMEL_FEATURE_NAME, CAMEL_FEATURE_SQL_NAME, CAMEL_FEATURE_STREAM_NAME));
    } else {
        options.add(editConfigurationFileExtend(KARAF_FEATURES_CONFIG_FILE, KARAF_BOOT_FEATURES_KEY, CAMEL_FEATURE_SQL_NAME));
        options.add(editConfigurationFileExtend(KARAF_FEATURES_CONFIG_FILE, KARAF_BOOT_FEATURES_KEY, CAMEL_FEATURE_STREAM_NAME));
    }
    
    options.add(bundle(mavenBundle().groupId(COMMONS_IO_GROUP_ID).artifactId(COMMONS_IO_ARTIFACT_ID)
                            .versionAsInProject().getURL()));

    if (System.getProperty(PROP_KARAF_DEBUG_CONFIGURATION_PORT) != null) {
        options.add(debugConfiguration(System.getProperty(PROP_KARAF_DEBUG_CONFIGURATION_PORT), true));
    }
    
    return options.toArray(new Option[1]);
}
 
开发者ID:jboss-integration,项目名称:fuse-bxms-integ,代码行数:53,代码来源:KarafConfigUtil.java



注:本文中的org.ops4j.pax.exam.karaf.options.LogLevelOption类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JobMediaSheetsSupported类代码示例发布时间:2022-05-22
下一篇:
Java ObjectIntOpenHashMap类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap