Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to set tag via constructor #2

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Added an option to set tag via constructor

  • Loading branch information
varshneyjayant committed Aug 12, 2015
commit d2db326cbf98d82a6af55e13f812612aec071194
@@ -25,19 +25,19 @@

/**
* Loggly client
*
*
* @author tony19@gmail.com
*/
public class LogglyClient implements ILogglyClient {
private static final String API_URL = "http://logs-01.loggly.com/";
private final ILogglyRestService loggly;
private final String token;
private String tags;
private String token;
private String tags = "android";

/**
* Creates a Loggly client
* @param token Loggly customer token
* http://loggly.com/docs/customer-token-authentication-token/
* http://loggly.com/docs/customer-token-authentication-token/tag/android
*/
public LogglyClient(String token) {
if (token == null || token.isEmpty()) {
@@ -52,6 +52,16 @@ public LogglyClient(String token) {
this.loggly = restAdapter.create(ILogglyRestService.class);
}

/**
* Creates a Loggly client
* @param token Loggly customer token
* http://loggly.com/docs/customer-token-authentication-token/tag/my-custom-tag
*/
public LogglyClient(String token, String tag) {
this(token);
this.tags = tag;
}

/**
* Creates a Loggly client with the specified REST API.
* This is package private for internal testing only.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.