File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 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
77 ` sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven `
881 . Follow the instructions to [ Install the Stackdriver Logging Agent] ( https://cloud.google.com/logging/docs/agent/installation )
991 . Create /etc/google-fluentd/config.d/forward.conf and add
10+
1011 ``` xml
1112 <source >
1213 type forward
1314 port 24224
1415 </source >
1516 ```
17+
16181. Restart the logging agent
19+
1720 `sudo service google-fluentd restart`
21+
18221. Clone the repo
23+
1924 `git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git`
25+
20261. Navigate to the Stackdriver sample folder
27+
2128 `java-docs-samples/compute/stackdriver`
29+
22301. Make sure that openjdk 8 is the selected java version
31+
2332 `sudo update-alternatives --config java`
33+
24341. Use maven to package the class as a jar
35+
2536 `mvn clean package`
37+
26381. Switch to the target folder and execute the jar file
39+
2740 `java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar`
41+
28421. On the Developer's Console, navigate to Stackdriver Error Reporting and verify that the sample
2943 error was logged.
You can’t perform that action at this time.
0 commit comments