Skip to content

Commit b27752a

Browse files
author
Shun Fan
committed
Fix formatting on readme for stackdriver
1 parent 98566d6 commit b27752a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

compute/stackdriver/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@ This sample demonstrates how to use [Stackdriver](https://cloud.google.com/error
44
1. Create a compute instance on the Google Cloud Platform Developer's Console
55
1. SSH into the instance you created
66
1. Update packages and install required packages
7-
sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven
7+
`sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven`
88
1. Follow the instructions to [Install the Stackdriver Logging Agent](https://cloud.google.com/logging/docs/agent/installation)
99
1. Create /etc/google-fluentd/config.d/forward.conf and add
10+
```xml
1011
<source>
1112
type forward
1213
port 24224
1314
</source>
15+
```
1416
1. Restart the logging agent
15-
sudo service google-fluentd restart
17+
`sudo service google-fluentd restart`
1618
1. Clone the repo
17-
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
19+
`git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git`
1820
1. Navigate to the Stackdriver sample folder
19-
java-docs-samples/compute/stackdriver
21+
`java-docs-samples/compute/stackdriver`
2022
1. Make sure that openjdk 8 is the selected java version
21-
sudo update-alternatives --config java
23+
`sudo update-alternatives --config java`
2224
1. Use maven to package the class as a jar
23-
mvn clean package
25+
`mvn clean package`
2426
1. Switch to the target folder and execute the jar file
25-
java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar
27+
`java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar`
2628
1. On the Developer's Console, navigate to Stackdriver Error Reporting and verify that the sample
2729
error was logged.

0 commit comments

Comments
 (0)