summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contributors/devel/sig-instrumentation/logging.md21
-rw-r--r--contributors/devel/sig-instrumentation/migration-to-structured-logging.md1
2 files changed, 21 insertions, 1 deletions
diff --git a/contributors/devel/sig-instrumentation/logging.md b/contributors/devel/sig-instrumentation/logging.md
index 4fcdfe73..b8e59a28 100644
--- a/contributors/devel/sig-instrumentation/logging.md
+++ b/contributors/devel/sig-instrumentation/logging.md
@@ -38,3 +38,24 @@ Logs generated by `ErrorS` command may be enhanced with additional debug informa
As per the comments, the practical default level is V(2). Developers and QE
environments may wish to run at V(3) or V(4). If you wish to change the log
level, you can pass in `-v=X` where X is the desired maximum level to log.
+
+## Logging header formats
+
+An example logging message is
+```
+I0528 19:15:22.737538 47512 logtest.go:52] msg...
+```
+
+This log line have this form:
+ Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg...
+where the fields are defined as follows:
+ L A single character, representing the log level (eg 'I' for INFO)
+ mm The month (zero padded; ie May is '05')
+ dd The day (zero padded)
+ hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds
+ threadid The space-padded thread ID as returned by GetTID()
+ file The file name
+ line The line number
+ msg The user-supplied message
+
+See more in [here](https://github.com/kubernetes/klog/blob/9ad246211af1ed84621ee94a26fcce0038b69cd1/klog.go#L581-L597)
diff --git a/contributors/devel/sig-instrumentation/migration-to-structured-logging.md b/contributors/devel/sig-instrumentation/migration-to-structured-logging.md
index c402377e..b6c0a18d 100644
--- a/contributors/devel/sig-instrumentation/migration-to-structured-logging.md
+++ b/contributors/devel/sig-instrumentation/migration-to-structured-logging.md
@@ -166,7 +166,6 @@ type KMetadata interface {
GetNamespace() string
}
```
-Logging header formats are in [here](https://github.com/kubernetes/klog/blob/9ad246211af1ed84621ee94a26fcce0038b69cd1/klog.go#L581-L597)
## Migration