Documentation ¶
Overview ¶
Package util provides ancillary functionality to go-vcloud-director library logging.go regulates logging for the whole library. See LOGGING.md for detailed usage
Index ¶
- Constants
- Variables
- func CallFuncName() string
- func CurrentFuncName() string
- func FuncNameCallStack() string
- func InitLogging()
- func ProcessRequestOutput(caller, operation, url, payload string, req *http.Request)
- func ProcessResponseOutput(caller string, resp *http.Response, result string)
- func SetApiLogFunctions(functions string)
- func SetCustomLogger(customLogger *log.Logger)
- func SetLog()
- func SetSkipTags(tags string)
- func Unpack(tarFile string) ([]string, string, error)
Constants ¶
View Source
const TmpDirPrefix = "govcd"
Variables ¶
View Source
var ( // All go-vcloud director logging goes through this logger Logger *log.Logger // Name of the log file // activated by GOVCD_LOG_FILE ApiLogFileName string = "go-vcloud-director.log" // Globally enabling logs // activated by GOVCD_LOG EnableLogging bool = false // Enable logging of passwords // activated by GOVCD_LOG_PASSWORDS LogPasswords bool = false // Enable logging of Http requests // disabled by GOVCD_LOG_SKIP_HTTP_REQ LogHttpRequest bool = true // Enable logging of Http responses // disabled by GOVCD_LOG_SKIP_HTTP_RESP LogHttpResponse bool = true // Sends log to screen. If value is either "stderr" or "err" // logging will go to os.Stderr. For any other value it will // go to os.Stdout LogOnScreen string = "" )
Functions ¶
func CallFuncName ¶
func CallFuncName() string
Returns the name of the function that called the current function. Used by functions that call processResponseOutput and processRequestOutput
func FuncNameCallStack ¶
func FuncNameCallStack() string
Returns a string containing up to 10 function names from the call stack
func ProcessRequestOutput ¶
Logs the essentials of a HTTP request
func ProcessResponseOutput ¶
Logs the essentials of a HTTP response
func SetApiLogFunctions ¶
func SetApiLogFunctions(functions string)
Sets the list of functions to include
func SetCustomLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.