Skip to content

Commit e98dcfd

Browse files
move to logging.md
1 parent 8bc3ad3 commit e98dcfd

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

contributors/devel/sig-instrumentation/logging.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,24 @@ Logs generated by `ErrorS` command may be enhanced with additional debug informa
3838
As per the comments, the practical default level is V(2). Developers and QE
3939
environments may wish to run at V(3) or V(4). If you wish to change the log
4040
level, you can pass in `-v=X` where X is the desired maximum level to log.
41+
42+
## Logging header formats
43+
44+
An example logging message is
45+
```
46+
I0528 19:15:22.737538 47512 logtest.go:52] msg...
47+
```
48+
49+
This log line have this form:
50+
Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg...
51+
where the fields are defined as follows:
52+
L A single character, representing the log level (eg 'I' for INFO)
53+
mm The month (zero padded; ie May is '05')
54+
dd The day (zero padded)
55+
hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds
56+
threadid The space-padded thread ID as returned by GetTID()
57+
file The file name
58+
line The line number
59+
msg The user-supplied message
60+
61+
See more in [here](https://github.com/kubernetes/klog/blob/9ad246211af1ed84621ee94a26fcce0038b69cd1/klog.go#L581-L597)

contributors/devel/sig-instrumentation/migration-to-structured-logging.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ type KMetadata interface {
166166
GetNamespace() string
167167
}
168168
```
169-
Logging header formats are in [here](https://github.com/kubernetes/klog/blob/9ad246211af1ed84621ee94a26fcce0038b69cd1/klog.go#L581-L597)
170169

171170
## Migration
172171

0 commit comments

Comments
 (0)