Skip to content

Commit 67f5ac3

Browse files
committed
Update README.md
1 parent 88978c5 commit 67f5ac3

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,66 @@
55

66
Stackify API for Java
77

8+
Errors and Logs Overview:
9+
10+
http://docs.stackify.com/m/7787/l/189767
11+
12+
Sign Up for a Trial:
13+
14+
http://www.stackify.com/sign-up/
15+
16+
Log4j 1.2 Appender:
17+
18+
https://github.com/stackify/stackify-log-log4j12
19+
20+
Logback Appender:
21+
22+
https://github.com/stackify/stackify-log-logback
23+
24+
## Configuration and Usage for Direct Logger
25+
26+
You need a stackify-api.properties file on your classpath that defines the configuration required for the Log API:
27+
```
28+
stackify.apiKey=YOUR_API_KEY
29+
stackify.application=YOUR_APPLICATION_NAME
30+
stackify.environment=YOUR_ENVIRONMENT
31+
```
32+
33+
Note: *If you are logging from a device that has the stackify-agent installed, the environment setting is optional. We will use the environment associated to your device in Stackify.*
34+
35+
Log a message to Stackify
36+
```java
37+
Logger.queueMessage("info", "Test message");
38+
```
39+
40+
Log an exception to Stackify
41+
```java
42+
Logger.queueException("error", e);
43+
```
44+
45+
Log a message and exception to Stackify
46+
```java
47+
Logger.queueException("error", "Test message", e);
48+
```
49+
50+
Be sure to shutdown the Direct Logger to flush this appender of any messages and shutdown the background thread:
51+
```java
52+
LogManager.shutdown();
53+
```
54+
55+
## Installation
56+
57+
Add it as a maven dependency:
58+
```xml
59+
<dependency>
60+
<groupId>com.stackify</groupId>
61+
<artifactId>stackify-api-java</artifactId>
62+
<version>2.0.0</version>
63+
</dependency>
64+
```
65+
66+
Note: *We are dependent on the Guava project from Google. We require version 15.0 (or beyond) for the background thread that sends data back to Stackify.*
67+
868
## License
969

1070
Copyright 2013 Stackify, LLC.

0 commit comments

Comments
 (0)