Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 2.19 KB

File metadata and controls

80 lines (56 loc) · 2.19 KB

stackify-api-java

Build Status Coverage Status

Stackify API for Java

Errors and Logs Overview:

http://docs.stackify.com/m/7787/l/189767

Sign Up for a Trial:

http://www.stackify.com/sign-up/

Log4j 1.2 Appender:

https://github.com/stackify/stackify-log-log4j12

Logback Appender:

https://github.com/stackify/stackify-log-logback

Configuration and Usage for Direct Logger

You need a stackify-api.properties file on your classpath that defines the configuration required for the Log API:

stackify.apiKey=YOUR_API_KEY
stackify.application=YOUR_APPLICATION_NAME
stackify.environment=YOUR_ENVIRONMENT

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.

Log a message to Stackify

Logger.queueMessage("info", "Test message");

Log an exception to Stackify

Logger.queueException("error", e);

Log a message and exception to Stackify

Logger.queueException("error", "Test message", e);

Be sure to shutdown the Direct Logger to flush this appender of any messages and shutdown the background thread:

LogManager.shutdown();

Installation

Add it as a maven dependency:

<dependency>
    <groupId>com.stackify</groupId>
    <artifactId>stackify-api-java</artifactId>
    <version>2.1.0</version>
</dependency>

License

Copyright 2013 Stackify, LLC.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.