Skip to content

Instantly share code, notes, and snippets.

View gclitheroe's full-sized avatar

Geoff Clitheroe gclitheroe

  • Xero
  • New Zealand
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gclitheroe on github.
  • I am geoffc (https://keybase.io/geoffc) on keybase.
  • I have a public key whose fingerprint is BCC4 3F71 EC8F C6E3 768C 4812 48D3 5E7E EDEF 918E

To claim this, I am signing this object:

@gclitheroe
gclitheroe / gist:8c40bc84da4227b8e4df
Created March 25, 2015 08:52
Golang - Log to Logentries - TLS
package main
import (
"github.com/GeoNet/log/logentries"
"log"
"time"
)
func init() {
logentries.Init("LOGENTRIES_TOKEN")
@gclitheroe
gclitheroe / gist:919e1ef46b3e415a4603
Created March 25, 2015 08:31
Golang - Log to Logentries
ackage main
import (
"log"
"log/syslog"
)
func main() {
w, err := syslog.Dial("tcp", "api.logentries.com:10000", syslog.LOG_NOTICE, "LE_TOKEN")
if err != nil {
@gclitheroe
gclitheroe / sysconfig mule
Created May 13, 2014 01:32
/etc/sysconfig/mule
SPRING_PROFILE=production
LOGENTRIES_TOKEN=blah123abc
@gclitheroe
gclitheroe / mule-conf
Last active August 29, 2015 14:01
mule conf for logging
...
wrapper.java.additional.4=-Dspring.profiles.active="%SPRING_PROFILE%"
wrapper.java.additional.4.stripquotes=TRUE
wrapper.java.additional.5=-Dhost.name="%HOSTNAME%"
wrapper.java.additional.5.stripquotes=TRUE
wrapper.java.additional.6=-Dlogentries.token="%LOGENTRIES_TOKEN%"
wrapper.java.additional.6.stripquotes=TRUE
@gclitheroe
gclitheroe / mule-script
Last active August 29, 2015 14:01
mule script env vars
#! /bin/sh
# Source networking configuration.
. /etc/sysconfig/network
# Source mule specific config.
if [ -e /etc/sysconfig/mule ]; then
. /etc/sysconfig/mule
fi
@gclitheroe
gclitheroe / le-appender
Created May 11, 2014 01:20
Log Entries appender
# Default log level
log4j.rootCategory=INFO, console, le
log4j.appender.le=com.logentries.log4j.LogentriesAppender
log4j.appender.le.layout=org.apache.log4j.PatternLayout
log4j.appender.le.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss ZZZ} [${host.name}] %-5p: %F:%L %m
log4j.appender.le.Token=${logentries.token}
log4j.appender.le.Debug=False
log4j.appender.le.Ssl=True
@gclitheroe
gclitheroe / spring-profile
Created May 11, 2014 00:48
spring-profile
<spring:beans profile="production">
<spring:import resource="classpath:mule-logentries-logging.xml"/>
</spring:beans>
@gclitheroe
gclitheroe / mule-props
Created May 11, 2014 00:19
Loading properties in Mule using Spring
<spring:beans>
<context:property-placeholder order="0" ignore-unresolvable="true" location="mule-heart-beat-producer.properties"/>
<context:property-placeholder order="-1" ignore-resource-not-found="true" ignore-unresolvable="true" location="file:/etc/sysconfig/mule-heart-beat-producer.properties"/>
<context:property-placeholder order="1" ignore-unresolvable="true" location="build-version.properties"/>
</spring:beans>
@gclitheroe
gclitheroe / mule-varnish-http
Created March 3, 2012 05:22
mule-varnish-http
<http:outbound-endpoint host="localhost" port="${quakevarnish.varnish.port}" method="DELETE">
<property key="X-BanExpression" value="obj.http.X-Url ~ /quakes/*"/>
</http:outbound-endpoint>