File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,37 @@ This sample demonstrates how to use [Stackdriver](https://cloud.google.com/error
7
7
` sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven `
8
8
1 . Follow the instructions to [ Install the Stackdriver Logging Agent] ( https://cloud.google.com/logging/docs/agent/installation )
9
9
1 . Create /etc/google-fluentd/config.d/forward.conf and add
10
+
10
11
``` xml
11
12
<source >
12
13
type forward
13
14
port 24224
14
15
</source >
15
16
```
17
+
16
18
1. Restart the logging agent
19
+
17
20
`sudo service google-fluentd restart`
21
+
18
22
1. Clone the repo
23
+
19
24
`git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git`
25
+
20
26
1. Navigate to the Stackdriver sample folder
27
+
21
28
`java-docs-samples/compute/stackdriver`
29
+
22
30
1. Make sure that openjdk 8 is the selected java version
31
+
23
32
`sudo update-alternatives --config java`
33
+
24
34
1. Use maven to package the class as a jar
35
+
25
36
`mvn clean package`
37
+
26
38
1. Switch to the target folder and execute the jar file
39
+
27
40
`java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar`
41
+
28
42
1. On the Developer's Console, navigate to Stackdriver Error Reporting and verify that the sample
29
43
error was logged.
You can’t perform that action at this time.
0 commit comments