Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReTimestamp = regexp.MustCompile(`^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{3}`)
ReTimestamp is used for replacing actual timestamps from detailed logging output to a testable string instead.
Functions ¶
func ResetLogger ¶
ResetLogger re-initializes the global logrus logger so stdout/stderr changes are applied to it. Otherwise after patching the streams logrus still points to the original file descriptor.
func WithCapSys ¶
WithCapSys temporarily redirects stdout/stderr pipes to capture the output while the function runs. Returns them as strings.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.