func WithService(n string) Option {
	return func(f *Formatter) {
		f.Service = n
	}
}
WithService lets you configure the service name used for error reporting.
package stackdriver
import (
	"encoding/json"
	"fmt"
	"strconv"
	"strings"
	"time"
	"github.com/go-stack/stack"
	"github.com/sirupsen/logrus"
)
var skipTimestamp bool
type severity string
const (
	severityDebug    severity = "DEBUG"
	severityInfo     severity = "INFO"
	severityWarning  severity = "WARNING"
	severityError    severity = "ERROR"
	severityCritical severity = "CRITICAL"
	severityAlert    severity = "ALERT"
)
var levelsToSeverity = map[logrus.Level]severity{
	logrus.DebugLevel: severityDebug,
	logrus.InfoLevel:  severityInfo,
	logrus.WarnLevel:  severityWarning,
	logrus.ErrorLevel: severityError,
	logrus.FatalLevel: severityCritical,
	logrus.PanicLevel: severityAlert,
}
type serviceContext struct {
	Service string `json:"service,omitempty"`
	Version string `json:"version,omitempty"`
}
type reportLocation struct {
	FilePath     string `json:"filePath,omitempty"`
	LineNumber   int    `json:"lineNumber,omitempty"`
	FunctionName string `json:"functionName,omitempty"`
}
type context struct {
	Data           map[string]interface{} `json:"data,omitempty"`
	ReportLocation *reportLocation        `json:"reportLocation,omitempty"`
	HTTPRequest    map[string]interface{} `json:"httpRequest,omitempty"`
}
type entry struct {
	Timestamp      string          `json:"timestamp,omitempty"`
	ServiceContext *serviceContext `json:"serviceContext,omitempty"`
	Message        string          `json:"message,omitempty"`
	Severity       severity        `json:"severity,omitempty"`
	Context        *context        `json:"context,omitempty"`
}
type Formatter struct {
	Service   string
	Version   string
	StackSkip []string
}
type Option func(*Formatter)