io.fabric8.maven.docker.util.Logger.verbose()方法的使用及代码示例

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

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

Logger.verbose介绍

[英]Verbose message
[中]冗长的消息

代码示例

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. protected void processLine(String line) {
  3. log.verbose("Credentials helper reply for \"%s\" is %s",CredentialHelperClient.this.credentialHelperName,line);
  4. version = line;
  5. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. protected void processLine(String line) {
  2. log.verbose(line);
  3. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. private void callBuildPlugin(File outputDir, String buildPluginClass) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  2. Class buildPlugin = Class.forName(buildPluginClass);
  3. try {
  4. Method method = buildPlugin.getMethod("addExtraFiles", File.class);
  5. method.invoke(null, outputDir);
  6. log.info("Extra files from %s extracted", buildPluginClass);
  7. } catch (NoSuchMethodException exp) {
  8. log.verbose("Build plugin %s does not support 'addExtraFiles' method", buildPluginClass);
  9. }
  10. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. public String getVersion() throws IOException {
  2. execute();
  3. if (version == null) {
  4. log.verbose("The credentials helper \"%s\" didn't return a version string",CredentialHelperClient.this.credentialHelperName);
  5. }
  6. return version;
  7. }
  8. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. protected void processLine(String line) {
  3. if (log.isDebugEnabled()) {
  4. log.verbose("%s", line);
  5. }
  6. if (line.startsWith(prefix)) {
  7. setEnvironmentVariable(line.substring(prefix.length()));
  8. }
  9. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. private void processDmpPluginDescription(URL pluginDesc, File outputDir) throws IOException {
  2. String line = null;
  3. try (LineNumberReader reader =
  4. new LineNumberReader(new InputStreamReader(pluginDesc.openStream(), "UTF8"))) {
  5. line = reader.readLine();
  6. while (line != null) {
  7. if (line.matches("^\\s*#")) {
  8. // Skip comments
  9. continue;
  10. }
  11. callBuildPlugin(outputDir, line);
  12. line = reader.readLine();
  13. }
  14. } catch (ClassNotFoundException e) {
  15. // Not declared as dependency, so just ignoring ...
  16. } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
  17. log.verbose("Found dmp-plugin %s but could not be called : %s",
  18. line,
  19. e.getMessage());
  20. }
  21. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. public void process(JsonObject json) throws DockerAccessException {
  3. if (json.has("error")) {
  4. String msg = json.get("error").getAsString();
  5. String detailMsg = "";
  6. if (json.has("errorDetail")) {
  7. JsonObject details = json.getAsJsonObject("errorDetail");
  8. detailMsg = details.get("message").getAsString();
  9. }
  10. throw new DockerAccessException("%s %s", json.get("error"),
  11. (msg.equals(detailMsg) || "".equals(detailMsg) ? "" : "(" + detailMsg + ")"));
  12. } else if (json.has("stream")) {
  13. String message = json.get("stream").getAsString();
  14. log.verbose("%s", message.trim());
  15. } else if (json.has("status")) {
  16. String status = json.get("status").getAsString().trim();
  17. String id = json.has("id") ? json.get("id").getAsString() : null;
  18. if (status.matches("^.*(Download|Pulling).*")) {
  19. log.info(" %s%s",id != null ? id + " " : "",status);
  20. }
  21. }
  22. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. private void injectExternalConfigActivation(ImageConfiguration unresolvedConfig, MavenProject project) {
  2. // Allow external activation of property configuration
  3. String mode = ConfigHelper.getExternalConfigActivationProperty(project);
  4. if(mode == null) {
  5. return;
  6. }
  7. Map<String, String> externalConfig = unresolvedConfig.getExternalConfig();
  8. if(externalConfig == null) {
  9. externalConfig = new HashMap<>();
  10. externalConfig.put("type", propertyConfigHandler.getType());
  11. externalConfig.put("mode", mode);
  12. unresolvedConfig.setExternalConfiguration(externalConfig);
  13. log.verbose("Global %s=%s property activates property configuration for image", ConfigHelper.EXTERNALCONFIG_ACTIVATION_PROPERTY, mode);
  14. }
  15. else
  16. {
  17. log.verbose("Ignoring %s=%s property, image has <external> in POM which takes precedence", ConfigHelper.EXTERNALCONFIG_ACTIVATION_PROPERTY, mode);
  18. }
  19. }
  20. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. private void logEnrichers(List<Enricher> enrichers) {
  2. log.verbose("Enrichers:");
  3. for (Enricher enricher : enrichers) {
  4. log.verbose("- %s", enricher.getName());
  5. }
  6. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. private String getDefaultServiceName(Integer port) {
  2. String serviceName = DEFAULT_PORT_MAPPING.get(port);
  3. if (StringUtils.isBlank(serviceName)) {
  4. return null;
  5. }
  6. log.verbose("Adding default port name %s for port %d", serviceName, port);
  7. return serviceName;
  8. }
  9. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. @Override
  2. public Map<String, String> getLabels(Kind kind) {
  3. String space = getConfig(Config.space);
  4. if (space != null && !space.trim().isEmpty()) {
  5. getLog().verbose("Setting space label '%s' on %s", space, kind.toString().toLowerCase());
  6. Map<String, String> labels = new HashMap<>(1);
  7. labels.put(SPACE_LABEL, space);
  8. return labels;
  9. }
  10. return super.getLabels(kind);
  11. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. private void mergeImage(ImageConfiguration imageConfiguration, Container container) {
  2. if (StringUtils.isBlank(container.getImage())) {
  3. String prefix = "";
  4. if (StringUtils.isNotBlank(imageConfiguration.getRegistry())) {
  5. log.verbose("Using registry %s for the image", imageConfiguration.getRegistry());
  6. prefix = imageConfiguration.getRegistry() + "/";
  7. }
  8. String imageFullName = prefix + imageConfiguration.getName();
  9. log.verbose("Setting image %s", imageFullName);
  10. container.setImage(imageFullName);
  11. }
  12. }

代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard

  1. @Override
  2. public void addMissingResources(KubernetesListBuilder builder) {
  3. if (!hasImageConfiguration()) {
  4. log.verbose("No images resolved. Skipping ...");
  5. return;
  6. }
  7. // Ensure that all contoller have template specs
  8. ensureTemplateSpecs(builder);
  9. // Update containers in template specs
  10. updateContainers(builder);
  11. }

代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard

  1. @Override
  2. public void visit(ContainerPortBuilder builder) {
  3. if (builder.getContainerPort() != null && (builder.getName() == null || builder.getName().isEmpty())) {
  4. String serviceName = DEFAULT_PORT_MAPPING.get(builder.getContainerPort());
  5. if (serviceName != null && !serviceName.isEmpty()) {
  6. log.verbose("Adding port name %s for port %d", serviceName, builder.getContainerPort());
  7. builder.withName(serviceName);
  8. }
  9. }
  10. }
  11. });

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. @Override
  2. public void visit(PodTemplateSpecBuilder builder) {
  3. InitContainerHandler initContainerHandler = new InitContainerHandler(log);
  4. if (initContainerHandler.hasInitContainer(builder, enricherName)) {
  5. log.verbose("Removing init container from openshift.yml for %s", enricherName);
  6. initContainerHandler.removeInitContainer(builder, enricherName);
  7. }
  8. }
  9. });

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. @Override
  2. public void addMissingResources(KubernetesListBuilder builder) {
  3. if (!hasImageConfiguration()) {
  4. log.verbose("No images resolved. Skipping ...");
  5. return;
  6. }
  7. // Ensure that all contoller have template specs
  8. ensureTemplateSpecs(builder);
  9. // Update containers in template specs
  10. updateContainers(builder);
  11. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. private void mergeContainerName(ImageConfiguration imageConfiguration, Container container) {
  2. if (StringUtils.isBlank(container.getName())) {
  3. String containerName = extractContainerName(getContext().getGav(), imageConfiguration);
  4. log.verbose("Setting container name %s",containerName);
  5. container.setName(containerName);
  6. }
  7. }

代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard

  1. private void mergeImage(ImageConfiguration imageConfiguration, Container container) {
  2. if (Strings.isNullOrBlank(container.getImage())) {
  3. String prefix = "";
  4. if (Strings.isNotBlank(imageConfiguration.getRegistry())) {
  5. log.verbose("Using registry %s for the image", imageConfiguration.getRegistry());
  6. prefix = imageConfiguration.getRegistry() + "/";
  7. }
  8. String imageFullName = prefix + imageConfiguration.getName();
  9. log.verbose("Setting image %s", imageFullName);
  10. container.setImage(imageFullName);
  11. }
  12. }

代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard

  1. private void mergeContainerName(ImageConfiguration imageConfiguration, Container container) {
  2. if (Strings.isNullOrBlank(container.getName())) {
  3. String containerName = extractContainerName(getProject(), imageConfiguration);
  4. log.verbose("Setting container name %s",containerName);
  5. container.setName(containerName);
  6. }
  7. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. private void addConfiguredResources(KubernetesListBuilder builder, List<ImageConfiguration> images) {
  2. log.verbose("Adding resources from plugin configuration");
  3. addSecrets(builder);
  4. addServices(builder, resources.getServices());
  5. addController(builder, images);
  6. addConfigMapFromConfigurations(builder, this.resources.getConfigMap());
  7. }

相关文章