Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 24, 2012
Ryan Lewon Fixes for appender for proper facility. 8f07cc6
Commits on Mar 27, 2012
Ryan Lewon Version bump to 0.9.3 f971239
Ryan Lewon xorl Merge pull request #2 from rlewon/graylog_facility_fix
Fixes for appender for proper facility.
086004f
2  build.gradle
View
@@ -1,7 +1,7 @@
apply plugin: 'java'
sourceCompatibility = 1.5
-version = '0.9.2'
+version = '0.9.3'
jar {
manifest {
attributes 'Implementation-Title': 'GELF Java Implementation', 'Implementation-Version': version
2  pom.xml
View
@@ -6,7 +6,7 @@
<groupId>org.graylog2</groupId>
<artifactId>gelfj</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>gelfj</name>
25 src/main/java/org/graylog2/log/GelfConsoleAppender.java
View
@@ -24,15 +24,16 @@
*
*/
public class GelfConsoleAppender extends ConsoleAppender implements GelfMessageProvider{
-
+
private static String originHost;
private boolean extractStacktrace;
private boolean addExtendedInformation;
private Map<String, String> fields;
+ private String facility;
private boolean facilityIsLogger;
// parent overrides.
-
+
public GelfConsoleAppender() {
super(); //To change body of overridden methods use File | Settings | File Templates.
}
@@ -44,13 +45,13 @@ public GelfConsoleAppender(Layout layout) {
public GelfConsoleAppender(Layout layout, String target) {
super(layout, target); //To change body of overridden methods use File | Settings | File Templates.
}
-
+
// GelfMessageProvider interface.
-
+
public void setAdditionalFields(String additionalFields) {
fields = (Map<String, String>) JSONValue.parse(additionalFields.replaceAll("'", "\""));
}
-
+
public boolean isExtractStacktrace() {
return extractStacktrace;
}
@@ -58,7 +59,7 @@ public boolean isExtractStacktrace() {
public void setExtractStacktrace(boolean extractStacktrace) {
this.extractStacktrace = extractStacktrace;
}
-
+
public boolean isAddExtendedInformation() {
return addExtendedInformation;
}
@@ -66,7 +67,7 @@ public boolean isAddExtendedInformation() {
public void setAddExtendedInformation(boolean addExtendedInformation) {
this.addExtendedInformation = addExtendedInformation;
}
-
+
public String getOriginHost() {
return originHost;
}
@@ -76,13 +77,17 @@ public void setOriginHost(String originHost) {
}
public String getFacility() {
- return null;
+ return facility;
+ }
+
+ public void setFacility(String facility) {
+ this.facility = facility;
}
public void setFacilityIsLogger(boolean facilityIsLogger) {
this.facilityIsLogger = facilityIsLogger;
}
-
+
public boolean getFacilityIsLogger() {
return this.facilityIsLogger;
}
@@ -95,7 +100,7 @@ public boolean getFacilityIsLogger() {
}
// the important parts.
-
+
@Override
protected void subAppend(LoggingEvent event) {
GelfMessage gelf = GelfMessageFactory.makeMessage(event, this);

No commit comments for this range

Something went wrong with that request. Please try again.