func (logger *Logger) Panicln(v ...interface{}) {
	s := fmt.Sprintln(v...)
	logger.Output(2, s)
	panic(s)
}
Panicln is same as Println() but calls to panic
package le_go
import (
	"crypto/tls"
	"fmt"
	"net"
	"os"
	"strings"
	"sync"
	"time"
)
type Logger struct {
	conn   net.Conn
	flag   int
	mu     sync.Mutex
	prefix string
	token  string
	buf    []byte
}
const lineSep = "\n"
func Connect(token string) (*Logger, error) {
	logger := Logger{
		token: token,
	}
	if err := logger.openConnection(); err != nil {
		return nil, err
	}
	return &logger, nil
}
func (logger *Logger) Close() error {
	if logger.conn != nil {
		return logger.conn.Close()
	}
	return nil
}
func (logger *Logger) openConnection() error {
	conn, err := tls.Dial("tcp", "data.logentries.com:443", &tls.Config{})
	if err != nil {
		return err
	}
	logger.conn = conn
	return nil
}
func (logger *Logger) isOpenConnection() bool {
	if logger.conn == nil {
		return false
	}
	buf := make([]byte, 1)
	logger.conn.SetReadDeadline(time.Now())
	_, err := logger.conn.Read(buf)
	switch err.(type) {
	case net.Error:
		if err.(net.Error).Timeout() == true {
			logger.conn.SetReadDeadline(time.Time{})
			return true
		}
	}
	return false
}
func (logger *Logger) ensureOpenConnection() error {
	if !logger.isOpenConnection() {
		if err := logger.openConnection(); err != nil {
			return err
		}
	}
	return nil
}
func (logger *Logger) Fatal(v ...interface{}) {
	logger.Output(2, fmt.Sprint(v...))
	os.Exit(1)
}
func (logger *Logger) Fatalf(format string, v ...interface{}) {
	logger.Output(2, fmt.Sprintf(format, v...))
	os.Exit(1)
}
func (logger *Logger) Fatalln(v ...interface{}) {
	logger.Output(2, fmt.Sprintln(v...))
	os.Exit(1)
}
func (logger *Logger) Flags() int {
	return logger.flag
}
func (logger *Logger) Output(calldepth int, s string) error {
	var (
		err        error
		waitPeriod = time.Millisecond
	)
	for {
		_, err = logger.Write([]byte(s))
		if err != nil {
			if connectionErr := logger.openConnection(); connectionErr != nil {
				return connectionErr
			}
			waitPeriod *= 2
			time.Sleep(waitPeriod)
			continue
		}
		return err
	}
}
func (logger *Logger) Panic(v ...interface{}) {
	s := fmt.Sprint(v...)
	logger.Output(2, s)
	panic(s)
}
func (logger *Logger) Panicf(format string, v ...interface{}) {
	s := fmt.Sprintf(format, v...)
	logger.Output(2, s)
	panic(s)
}