本文整理了Java中io.fabric8.maven.docker.util.Logger.verbose()
方法的一些代码示例,展示了Logger.verbose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.verbose()
方法的具体详情如下:
包路径:io.fabric8.maven.docker.util.Logger
类名称:Logger
方法名:verbose
[英]Verbose message
[中]冗长的消息
代码示例来源:origin: fabric8io/docker-maven-plugin
@Override
protected void processLine(String line) {
log.verbose("Credentials helper reply for \"%s\" is %s",CredentialHelperClient.this.credentialHelperName,line);
version = line;
}
代码示例来源:origin: fabric8io/docker-maven-plugin
protected void processLine(String line) {
log.verbose(line);
}
代码示例来源:origin: fabric8io/docker-maven-plugin
private void callBuildPlugin(File outputDir, String buildPluginClass) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
Class buildPlugin = Class.forName(buildPluginClass);
try {
Method method = buildPlugin.getMethod("addExtraFiles", File.class);
method.invoke(null, outputDir);
log.info("Extra files from %s extracted", buildPluginClass);
} catch (NoSuchMethodException exp) {
log.verbose("Build plugin %s does not support 'addExtraFiles' method", buildPluginClass);
}
}
代码示例来源:origin: fabric8io/docker-maven-plugin
public String getVersion() throws IOException {
execute();
if (version == null) {
log.verbose("The credentials helper \"%s\" didn't return a version string",CredentialHelperClient.this.credentialHelperName);
}
return version;
}
}
代码示例来源:origin: fabric8io/docker-maven-plugin
@Override
protected void processLine(String line) {
if (log.isDebugEnabled()) {
log.verbose("%s", line);
}
if (line.startsWith(prefix)) {
setEnvironmentVariable(line.substring(prefix.length()));
}
}
代码示例来源:origin: fabric8io/docker-maven-plugin
private void processDmpPluginDescription(URL pluginDesc, File outputDir) throws IOException {
String line = null;
try (LineNumberReader reader =
new LineNumberReader(new InputStreamReader(pluginDesc.openStream(), "UTF8"))) {
line = reader.readLine();
while (line != null) {
if (line.matches("^\\s*#")) {
// Skip comments
continue;
}
callBuildPlugin(outputDir, line);
line = reader.readLine();
}
} catch (ClassNotFoundException e) {
// Not declared as dependency, so just ignoring ...
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
log.verbose("Found dmp-plugin %s but could not be called : %s",
line,
e.getMessage());
}
}
代码示例来源:origin: fabric8io/docker-maven-plugin
@Override
public void process(JsonObject json) throws DockerAccessException {
if (json.has("error")) {
String msg = json.get("error").getAsString();
String detailMsg = "";
if (json.has("errorDetail")) {
JsonObject details = json.getAsJsonObject("errorDetail");
detailMsg = details.get("message").getAsString();
}
throw new DockerAccessException("%s %s", json.get("error"),
(msg.equals(detailMsg) || "".equals(detailMsg) ? "" : "(" + detailMsg + ")"));
} else if (json.has("stream")) {
String message = json.get("stream").getAsString();
log.verbose("%s", message.trim());
} else if (json.has("status")) {
String status = json.get("status").getAsString().trim();
String id = json.has("id") ? json.get("id").getAsString() : null;
if (status.matches("^.*(Download|Pulling).*")) {
log.info(" %s%s",id != null ? id + " " : "",status);
}
}
}
代码示例来源:origin: fabric8io/docker-maven-plugin
private void injectExternalConfigActivation(ImageConfiguration unresolvedConfig, MavenProject project) {
// Allow external activation of property configuration
String mode = ConfigHelper.getExternalConfigActivationProperty(project);
if(mode == null) {
return;
}
Map<String, String> externalConfig = unresolvedConfig.getExternalConfig();
if(externalConfig == null) {
externalConfig = new HashMap<>();
externalConfig.put("type", propertyConfigHandler.getType());
externalConfig.put("mode", mode);
unresolvedConfig.setExternalConfiguration(externalConfig);
log.verbose("Global %s=%s property activates property configuration for image", ConfigHelper.EXTERNALCONFIG_ACTIVATION_PROPERTY, mode);
}
else
{
log.verbose("Ignoring %s=%s property, image has <external> in POM which takes precedence", ConfigHelper.EXTERNALCONFIG_ACTIVATION_PROPERTY, mode);
}
}
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
private void logEnrichers(List<Enricher> enrichers) {
log.verbose("Enrichers:");
for (Enricher enricher : enrichers) {
log.verbose("- %s", enricher.getName());
}
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
private String getDefaultServiceName(Integer port) {
String serviceName = DEFAULT_PORT_MAPPING.get(port);
if (StringUtils.isBlank(serviceName)) {
return null;
}
log.verbose("Adding default port name %s for port %d", serviceName, port);
return serviceName;
}
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
@Override
public Map<String, String> getLabels(Kind kind) {
String space = getConfig(Config.space);
if (space != null && !space.trim().isEmpty()) {
getLog().verbose("Setting space label '%s' on %s", space, kind.toString().toLowerCase());
Map<String, String> labels = new HashMap<>(1);
labels.put(SPACE_LABEL, space);
return labels;
}
return super.getLabels(kind);
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
private void mergeImage(ImageConfiguration imageConfiguration, Container container) {
if (StringUtils.isBlank(container.getImage())) {
String prefix = "";
if (StringUtils.isNotBlank(imageConfiguration.getRegistry())) {
log.verbose("Using registry %s for the image", imageConfiguration.getRegistry());
prefix = imageConfiguration.getRegistry() + "/";
}
String imageFullName = prefix + imageConfiguration.getName();
log.verbose("Setting image %s", imageFullName);
container.setImage(imageFullName);
}
}
代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard
@Override
public void addMissingResources(KubernetesListBuilder builder) {
if (!hasImageConfiguration()) {
log.verbose("No images resolved. Skipping ...");
return;
}
// Ensure that all contoller have template specs
ensureTemplateSpecs(builder);
// Update containers in template specs
updateContainers(builder);
}
代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard
@Override
public void visit(ContainerPortBuilder builder) {
if (builder.getContainerPort() != null && (builder.getName() == null || builder.getName().isEmpty())) {
String serviceName = DEFAULT_PORT_MAPPING.get(builder.getContainerPort());
if (serviceName != null && !serviceName.isEmpty()) {
log.verbose("Adding port name %s for port %d", serviceName, builder.getContainerPort());
builder.withName(serviceName);
}
}
}
});
代码示例来源:origin: fabric8io/fabric8-maven-plugin
@Override
public void visit(PodTemplateSpecBuilder builder) {
InitContainerHandler initContainerHandler = new InitContainerHandler(log);
if (initContainerHandler.hasInitContainer(builder, enricherName)) {
log.verbose("Removing init container from openshift.yml for %s", enricherName);
initContainerHandler.removeInitContainer(builder, enricherName);
}
}
});
代码示例来源:origin: fabric8io/fabric8-maven-plugin
@Override
public void addMissingResources(KubernetesListBuilder builder) {
if (!hasImageConfiguration()) {
log.verbose("No images resolved. Skipping ...");
return;
}
// Ensure that all contoller have template specs
ensureTemplateSpecs(builder);
// Update containers in template specs
updateContainers(builder);
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
private void mergeContainerName(ImageConfiguration imageConfiguration, Container container) {
if (StringUtils.isBlank(container.getName())) {
String containerName = extractContainerName(getContext().getGav(), imageConfiguration);
log.verbose("Setting container name %s",containerName);
container.setName(containerName);
}
}
代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard
private void mergeImage(ImageConfiguration imageConfiguration, Container container) {
if (Strings.isNullOrBlank(container.getImage())) {
String prefix = "";
if (Strings.isNotBlank(imageConfiguration.getRegistry())) {
log.verbose("Using registry %s for the image", imageConfiguration.getRegistry());
prefix = imageConfiguration.getRegistry() + "/";
}
String imageFullName = prefix + imageConfiguration.getName();
log.verbose("Setting image %s", imageFullName);
container.setImage(imageFullName);
}
}
代码示例来源:origin: io.fabric8/fabric8-maven-enricher-standard
private void mergeContainerName(ImageConfiguration imageConfiguration, Container container) {
if (Strings.isNullOrBlank(container.getName())) {
String containerName = extractContainerName(getProject(), imageConfiguration);
log.verbose("Setting container name %s",containerName);
container.setName(containerName);
}
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
private void addConfiguredResources(KubernetesListBuilder builder, List<ImageConfiguration> images) {
log.verbose("Adding resources from plugin configuration");
addSecrets(builder);
addServices(builder, resources.getServices());
addController(builder, images);
addConfigMapFromConfigurations(builder, this.resources.getConfigMap());
}
内容来源于网络,如有侵权,请联系作者删除!