utils

package module
v0.0.0-...-414c0a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//    Trace   *log.Logger
	Info    *logrus.Logger
	Warning *logrus.Logger
	Error   *logrus.Logger
)
View Source
var Logfile *os.File

const LOG_FILE = "servercore-log.txt"

Functions

func CloseLogFile

func CloseLogFile()

func ExtractPayload

func ExtractPayload(request string, rMap *map[string]interface{})

func GetOutboundIP

func GetOutboundIP() string

Get preferred outbound ip of this machine, or sets it to localhost

func InitLog

func InitLog(filename string)

func PathToUrl

func PathToUrl(path string) string

func TrimLogFile

func TrimLogFile(logFile *os.File)

* * The log file is trimmed to 20% of its size when exceeding 10MB. *

func UrlToPath

func UrlToPath(url string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL