|
56 | 56 | // This package provides several flags that modify this behavior. |
57 | 57 | // As a result, flag.Parse must be called before any logging is done. |
58 | 58 | // |
59 | | -// -logtostderr=true |
60 | | -// Logs are written to standard error instead of to files. |
61 | | -// By default, all logs are written regardless of severity |
62 | | -// (legacy behavior). To filter logs by severity when |
63 | | -// -logtostderr=true, set -legacy_stderr_threshold_behavior=false |
64 | | -// and use -stderrthreshold. |
65 | | -// With -legacy_stderr_threshold_behavior=true, |
66 | | -// -stderrthreshold has no effect. |
| 59 | +// -logtostderr=true |
| 60 | +// Logs are written to standard error instead of to files. |
| 61 | +// By default, all logs are written regardless of severity |
| 62 | +// (legacy behavior). To filter logs by severity when |
| 63 | +// -logtostderr=true, set -legacy_stderr_threshold_behavior=false |
| 64 | +// and use -stderrthreshold. |
| 65 | +// With -legacy_stderr_threshold_behavior=true, |
| 66 | +// -stderrthreshold has no effect. |
67 | 67 | // |
68 | | -// The following flags always have no effect: |
69 | | -// -alsologtostderr, -alsologtostderrthreshold, and -log_dir. |
70 | | -// Output redirection at runtime with SetOutput is also ignored. |
71 | | -// -alsologtostderr=false |
72 | | -// Logs are written to standard error as well as to files. |
73 | | -// -alsologtostderrthreshold=INFO |
74 | | -// Log events at or above this severity are logged to standard |
75 | | -// error when -alsologtostderr=true (no effect when -logtostderr=true). |
76 | | -// Default is INFO to maintain backward compatibility. |
77 | | -// -stderrthreshold=ERROR |
78 | | -// Log events at or above this severity are logged to standard |
79 | | -// error as well as to files. When -logtostderr=true, this flag |
80 | | -// has no effect unless -legacy_stderr_threshold_behavior=false. |
81 | | -// -legacy_stderr_threshold_behavior=true |
82 | | -// If true, -stderrthreshold is ignored when -logtostderr=true |
83 | | -// (legacy behavior). If false, -stderrthreshold is honored even |
84 | | -// when -logtostderr=true, allowing severity-based filtering. |
85 | | -// -log_dir="" |
86 | | -// Log files will be written to this directory instead of the |
87 | | -// default temporary directory. |
| 68 | +// The following flags always have no effect: |
| 69 | +// -alsologtostderr, -alsologtostderrthreshold, and -log_dir. |
| 70 | +// Output redirection at runtime with SetOutput is also ignored. |
| 71 | +// -alsologtostderr=false |
| 72 | +// Logs are written to standard error as well as to files. |
| 73 | +// -alsologtostderrthreshold=INFO |
| 74 | +// Log events at or above this severity are logged to standard |
| 75 | +// error when -alsologtostderr=true (no effect when -logtostderr=true). |
| 76 | +// Default is INFO to maintain backward compatibility. |
| 77 | +// -stderrthreshold=ERROR |
| 78 | +// Log events at or above this severity are logged to standard |
| 79 | +// error as well as to files. When -logtostderr=true, this flag |
| 80 | +// has no effect unless -legacy_stderr_threshold_behavior=false. |
| 81 | +// -legacy_stderr_threshold_behavior=true |
| 82 | +// If true, -stderrthreshold is ignored when -logtostderr=true |
| 83 | +// (legacy behavior). If false, -stderrthreshold is honored even |
| 84 | +// when -logtostderr=true, allowing severity-based filtering. |
| 85 | +// -log_dir="" |
| 86 | +// Log files will be written to this directory instead of the |
| 87 | +// default temporary directory. |
88 | 88 | // |
89 | | -// Other flags provide aids to debugging. |
| 89 | +// Other flags provide aids to debugging. |
90 | 90 | // |
91 | | -// -log_backtrace_at="" |
92 | | -// When set to a file and line number holding a logging statement, |
93 | | -// such as |
94 | | -// -log_backtrace_at=gopherflakes.go:234 |
95 | | -// a stack trace will be written to the Info log whenever execution |
96 | | -// hits that statement. (Unlike with -vmodule, the ".go" must be |
97 | | -// present.) |
98 | | -// -v=0 |
99 | | -// Enable V-leveled logging at the specified level. |
100 | | -// -vmodule="" |
101 | | -// The syntax of the argument is a comma-separated list of pattern=N, |
102 | | -// where pattern is a literal file name (minus the ".go" suffix) or |
103 | | -// "glob" pattern and N is a V level. For instance, |
104 | | -// -vmodule=gopher*=3 |
105 | | -// sets the V level to 3 in all Go files whose names begin "gopher". |
| 91 | +// -log_backtrace_at="" |
| 92 | +// When set to a file and line number holding a logging statement, |
| 93 | +// such as |
| 94 | +// -log_backtrace_at=gopherflakes.go:234 |
| 95 | +// a stack trace will be written to the Info log whenever execution |
| 96 | +// hits that statement. (Unlike with -vmodule, the ".go" must be |
| 97 | +// present.) |
| 98 | +// -v=0 |
| 99 | +// Enable V-leveled logging at the specified level. |
| 100 | +// -vmodule="" |
| 101 | +// The syntax of the argument is a comma-separated list of pattern=N, |
| 102 | +// where pattern is a literal file name (minus the ".go" suffix) or |
| 103 | +// "glob" pattern and N is a V level. For instance, |
| 104 | +// -vmodule=gopher*=3 |
| 105 | +// sets the V level to 3 in all Go files whose names begin "gopher". |
106 | 106 | package klog |
107 | 107 |
|
108 | 108 | import ( |
|
0 commit comments