File tree 4 files changed +7
-15
lines changed
main/java/org/apache/logging/log4j/kubernetes
test/java/org/apache/logging/log4j/kubernetes
4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 23
23
<version >${revision} </version >
24
24
<relativePath >../log4j-parent</relativePath >
25
25
</parent >
26
-
27
26
<artifactId >log4j-kubernetes</artifactId >
28
27
<packaging >jar</packaging >
29
28
<name >Apache Log4j Kubernetes Library</name >
30
29
<description >Apache Log4j Kubernetes Support</description >
31
30
<properties >
32
- <log4jParentDir >${basedir}/..</log4jParentDir >
33
31
34
32
<!--
35
33
~ OSGi and JPMS options
36
34
-->
37
35
<bnd-extra-module-options >
38
- <!-- Standardize names -->
39
- kubernetes.client;substitute="kubernetes-client",
40
- kubernetes.model.core;substitute="kubernetes-model-core
36
+ <!-- Filebased module names: MUST be static -->
37
+ kubernetes.client;substitute="kubernetes-client";transitive=false;static=true ,
38
+ kubernetes.model.core;substitute="kubernetes-model-core";transitive=false;static=true
41
39
</bnd-extra-module-options >
42
40
<Fragment-Host >org.apache.logging.log4j.core</Fragment-Host >
43
41
</properties >
55
53
<groupId >io.fabric8</groupId >
56
54
<artifactId >kubernetes-client</artifactId >
57
55
</dependency >
58
- <dependency >
59
- <groupId >org.hamcrest</groupId >
60
- <artifactId >hamcrest</artifactId >
61
- <scope >test</scope >
62
- </dependency >
63
56
<dependency >
64
57
<groupId >org.junit.jupiter</groupId >
65
58
<artifactId >junit-jupiter-engine</artifactId >
Original file line number Diff line number Diff line change @@ -56,9 +56,8 @@ public static String getContainerId() {
56
56
.orElse (null );
57
57
LOGGER .debug ("Found container id {}" , id );
58
58
return id ;
59
- } else {
60
- LOGGER .warn ("Unable to access container information" );
61
59
}
60
+ LOGGER .warn ("Unable to access container information" );
62
61
} catch (IOException ioe ) {
63
62
LOGGER .warn ("Error obtaining container id: {}" , ioe .getMessage ());
64
63
}
Original file line number Diff line number Diff line change 18
18
19
19
import io .fabric8 .kubernetes .api .model .Container ;
20
20
import io .fabric8 .kubernetes .api .model .ContainerStatus ;
21
+ import io .fabric8 .kubernetes .api .model .Namespace ;
21
22
import io .fabric8 .kubernetes .api .model .Pod ;
22
23
import io .fabric8 .kubernetes .client .Config ;
23
24
import io .fabric8 .kubernetes .client .KubernetesClient ;
@@ -57,7 +58,7 @@ public class KubernetesLookup extends AbstractLookup {
57
58
LoaderUtil .isClassAvailable ("org.apache.logging.log4j.spring.cloud.config.client.SpringEnvironmentHolder" )
58
59
|| LoaderUtil .isClassAvailable ("org.apache.logging.log4j.spring.boot.SpringEnvironmentHolder" );
59
60
private Pod pod ;
60
- private io . fabric8 . kubernetes . api . model . Namespace namespace ;
61
+ private Namespace namespace ;
61
62
private URL masterUrl ;
62
63
63
64
public KubernetesLookup () {
@@ -67,7 +68,7 @@ public KubernetesLookup() {
67
68
initialize ();
68
69
}
69
70
70
- KubernetesLookup (Pod pod , io . fabric8 . kubernetes . api . model . Namespace namespace , URL masterUrl ) {
71
+ KubernetesLookup (Pod pod , Namespace namespace , URL masterUrl ) {
71
72
this .pod = pod ;
72
73
this .namespace = namespace ;
73
74
this .masterUrl = masterUrl ;
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ public void testLocal() throws Exception {
60
60
assertEquals ("Incorrect pod name" , "sampleapp-584f99476d-mnrp4" , lookup .lookup ("podName" ));
61
61
} finally {
62
62
lookup .clearInfo ();
63
- ;
64
63
}
65
64
}
66
65
You can’t perform that action at this time.
0 commit comments