func (logger *Logger) Fatalln(v ...interface{}) {
	logger.Output(2, fmt.Sprintln(v...))
	os.Exit(1)
}
Fatalln is same as Println() but calls to os.Exit(1)
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)
}