Skip to content

Commit

Permalink
Adding env bean to Appender so that it can be passed with Events into…
Browse files Browse the repository at this point in the history
… the Scalyr API
  • Loading branch information
adavisvivint committed Jun 23, 2017
1 parent 05129ea commit 2a38138
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<logfile>myapp</logfile>
<parser>logback</parser>
<serverHost>myhost</serverHost>
<!-- Uncomment to set an env and send to scalyr in the ServerInfo
<env>myenv</env>
-->
<!-- Uncomment to override default layout
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%-4relative [%thread] - %msg%n</pattern>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/scalyr/logback/ScalyrAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ public String getParser() {
return parser;
}

public void setEnv(String env) {
this.env = env;
}

public String getEnv() {
return env;
}

public void setParser(String parser) {
this.parser = parser;
}
Expand Down

0 comments on commit 2a38138

Please sign in to comment.