+// earlyDebug Used to log info before logger has been initialized
+var earlyDebug []string
+
+func earlyPrintf(format string, args ...interface{}) {
+ earlyDebug = append(earlyDebug, fmt.Sprintf(format, args...))
+}
+
+func earlyDisplay() {
+ for _, str := range earlyDebug {
+ Log.Infof("%s", str)
+ }
+ earlyDebug = []string{}
+}
+
+// LogSillyf Logging helper used for silly logging (printed on log.debug)
+func LogSillyf(format string, args ...interface{}) {
+ sillyVal, sillyLog := os.LookupEnv("XDS_LOG_SILLY")
+ if sillyLog && sillyVal == "1" {
+ Log.Debugf("SILLY: "+format, args...)
+ }
+}
+