Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion src/main/java/com/stackify/api/LogMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.stackify.api;

import java.util.List;
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
Expand Down Expand Up @@ -90,6 +91,12 @@ public class LogMsg {
@JsonProperty("id")
private final String id;

/**
* List of Tags
*/
@JsonProperty("Tags")
private final List<String> tags;

/**
* @return the msg
*/
Expand Down Expand Up @@ -160,6 +167,14 @@ public String getId() {
return id;
}

/**
* @return the List of Tags
*/
public List<String> getTags()
{
return tags;
}

/**
* @return An instance of Builder, based on current class state
*/
Expand All @@ -173,7 +188,8 @@ public Builder toBuilder() {
.level(this.level)
.transId(this.transId)
.srcMethod(this.srcMethod)
.srcLine(this.srcLine);
.srcLine(this.srcLine)
.tags(this.tags);
}

/**
Expand All @@ -190,6 +206,7 @@ private LogMsg(final Builder builder) {
this.srcMethod = builder.srcMethod;
this.srcLine = builder.srcLine;
this.id = UUID.randomUUID().toString();
this.tags = builder.tags;
}

/**
Expand Down Expand Up @@ -259,6 +276,12 @@ public static class Builder {
@JsonProperty("SrcLine")
private Integer srcLine;

/**
* The builder's tags
*/
@JsonProperty("Tags")
private List<String> tags;

/**
* Sets the builder's msg
* @param msg The msg to be set
Expand Down Expand Up @@ -349,6 +372,18 @@ public Builder srcLine(final Integer srcLine) {
return this;
}

/**
* Sets the builder's tags
* @param tags A list of tags associated to this LogMsg
* @return Reference to the current object
*/
public Builder tags(final List<String> tags)
{
this.tags = tags;
return this;
}


/**
* @return A new object constructed from this builder
*/
Expand Down