logging

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(file string, debugFile string, debugLog bool) (urls string, adapt string, codec string, maxHeight int, streamDuration int, maxBuffer int, initBuffer int, hLS string, storeDash string, getHeader string, debug string, terminalPrint string, quic string, expRatio float64, printHeader string, useTestbed string, configLogFile string)

Configure : extract all parameter values from the input config file

func DebugPrint

func DebugPrint(fileLocation string, printLog bool, inputPrefix string, inputString string)

DebugPrint : * fileLocation string - pass in fileLocation * printLog bool - pass in boolean to print log * inputPrefix string - define the prefix to use in the log file * inputString string - string to print to log * print to the debug log file

func DebugPrintfIntArray

func DebugPrintfIntArray(fileLocation string, printLog bool, inputPrefix string, inputString string, arguement []int)

DebugPrintfIntArray : * print an int array to the logFile

func DebugPrintfStringArray

func DebugPrintfStringArray(fileLocation string, printLog bool, inputPrefix string, inputString string, arguement []string)

DebugPrintfStringArray : * print a string array to the logFile

func PrintHeaders

func PrintHeaders(extendPrintLog bool, fileLocation string, logDownload string, debugFile string, debugLog bool, printLog bool, printHeadersData map[string]string)

PrintHeaders : * print headers to the output log * create a logFile of the print output

func PrintLog

func PrintLog(segNum string, arrTime string, delTime string, stallDur string,
	repLevel string, delRate string, actRate string, byteSize string,
	buffLevel string, algoIn string, segDurationIn string, extendPrintLog bool, codecIn string, widthIn string, heightIn string, fpsIn string, playIn string, rttIn string, fileLocation string, logDownload string, printLog bool, printHeadersData map[string]string, segReplaceIn string, httpProtocolIn string)

PrintLog : * print a line to the output log

func PrintPlayOutLog

func PrintPlayOutLog(currentTime int, initBuffer int, mapSegments map[int]SegPrintLogInformation, logDownload string, printLog bool, printHeadersData map[string]string)

PrintPlayOutLog : * print the play_out logs only when the current time is >= play_out time

func PrintToFile

func PrintToFile(segNum string, arrTime string, delTime string, stallDur string,
	repLevel string, delRate string, actRate string, byteSize string,
	buffLevel string, algo string, segDuration string, extendPrintLog bool, codec string, width string, height string, fps string, playHeader string, rttHeader string, mainPrintString string, extendPrintString string, fileLocation string, segReplace string, httpProtocol string)

PrintToFile : * print a line to the file logDownload

func PrintsegInformationLogMap

func PrintsegInformationLogMap(debugFile string, debugLog bool, mapSegments map[int]SegPrintLogInformation)

PrintsegInformationLogMap : * print the elements of mapSegments to the logFile

Types

type Config

type Config struct {
	URL            string  `json:"url"`
	Adapt          string  `json:"adapt"`
	Codec          string  `json:"codec"`
	Debug          string  `json:"debug"`
	InitBuffer     int     `json:"initBuffer"`
	MaxBuffer      int     `json:"maxBuffer"`
	MaxHeight      int     `json:"maxHeight"`
	StreamDuration int     `json:"streamDuration"`
	StoreDash      string  `json:"storeDash"`
	TerminalPrint  string  `json:"terminalPrint"`
	HLS            string  `json:"hls"`
	GetHeaders     string  `json:"getHeaders"`
	ExpRatio       float64 `json:"expRatio"`
	Quic           string  `json:"quic"`
	PrintHeader    string  `json:"printHeader"`
	UseTestbed     string  `json:"useTestbed"`
	LogFile        string  `json:"logFile"`
}

Config : Struct for reading content from the config file in json

type SegPrintLogInformation

type SegPrintLogInformation struct {
	ArrivalTime int
	// delivery time of file requested
	DeliveryTime int
	StallTime    int
	Bandwidth    int
	DelRate      int
	ActRate      int
	SegSize      int
	// buffer = difference in arr_times for adjacent segments + segment duration of this segment
	BufferLevel          int
	Adapt                string
	SegmentDuration      int
	ExtendPrintLog       bool
	RepCodec             string
	RepWidth             int
	RepHeight            int
	RepFps               int
	PlayStartPosition    int
	PlaybackTime         int
	Rtt                  float64
	FileDownloadLocation string
	RepIndex             int
	MpdIndex             int
	AdaptIndex           int
	SegmentIndex         int
	Played               bool
	SegReplace           string
	HTTPprotocol         string
	SegmentFileName      string
}

SegPrintLogInformation per segment map of print log output

Jump to

Keyboard shortcuts

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