Update go dependencies
This commit is contained in:
parent
14a9e9f3fa
commit
14f4a7b8e8
1349 changed files with 128369 additions and 32627 deletions
1
vendor/k8s.io/klog/.travis.yml
generated
vendored
1
vendor/k8s.io/klog/.travis.yml
generated
vendored
|
|
@ -1,4 +1,5 @@
|
|||
language: go
|
||||
go_import_path: k8s.io/klog
|
||||
dist: xenial
|
||||
go:
|
||||
- 1.9.x
|
||||
|
|
|
|||
13
vendor/k8s.io/klog/CONTRIBUTING.md
generated
vendored
13
vendor/k8s.io/klog/CONTRIBUTING.md
generated
vendored
|
|
@ -8,10 +8,6 @@ _As contributors and maintainers of this project, and in the interest of fosteri
|
|||
|
||||
We have full documentation on how to get started contributing here:
|
||||
|
||||
<!---
|
||||
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
|
||||
-->
|
||||
|
||||
- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
|
||||
- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing)
|
||||
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers
|
||||
|
|
@ -20,12 +16,7 @@ If your repo has certain guidelines for contribution, put them here ahead of the
|
|||
|
||||
- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!
|
||||
|
||||
<!---
|
||||
Custom Information - if you're copying this template for the first time you can add custom content here, for example:
|
||||
|
||||
## Contact Information
|
||||
|
||||
- [Slack channel](https://kubernetes.slack.com/messages/kubernetes-users) - Replace `kubernetes-users` with your slack channel string, this will send users directly to your channel.
|
||||
- [Mailing list](URL)
|
||||
|
||||
-->
|
||||
- [Slack](https://kubernetes.slack.com/messages/sig-architecture)
|
||||
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture)
|
||||
|
|
|
|||
2
vendor/k8s.io/klog/OWNERS
generated
vendored
2
vendor/k8s.io/klog/OWNERS
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
approvers:
|
||||
- dims
|
||||
|
|
|
|||
38
vendor/k8s.io/klog/README.md
generated
vendored
38
vendor/k8s.io/klog/README.md
generated
vendored
|
|
@ -5,6 +5,32 @@ klog is a permanant fork of https://github.com/golang/glog. original README from
|
|||
|
||||
----
|
||||
|
||||
How to use klog
|
||||
===============
|
||||
- Replace imports for `github.com/golang/glog` with `k8s.io/klog`
|
||||
- Use `klog.InitFlags(nil)` explicitly for initializing global flags as we no longer use `init()` method to register the flags
|
||||
- You can now use `log-file` instead of `log-dir` for logging to a single file (See `examples/log_file/usage_log_file.go`)
|
||||
- If you want to redirect everything logged using klog somewhere else (say syslog!), you can use `klog.SetOutput()` method and supply a `io.Writer`. (See `examples/set_output/usage_set_output.go`)
|
||||
- For more logging conventions (See [Logging Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/logging.md))
|
||||
|
||||
### Coexisting with glog
|
||||
This package can be used side by side with glog. [This example](examples/coexist_glog/coexist_glog.go) shows how to initialize and syncronize flags from the global `flag.CommandLine` FlagSet. In addition, the example makes use of stderr as combined output by setting `alsologtostderr` (or `logtostderr`) to `true`.
|
||||
|
||||
## Community, discussion, contribution, and support
|
||||
|
||||
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
|
||||
|
||||
You can reach the maintainers of this project at:
|
||||
|
||||
- [Slack](https://kubernetes.slack.com/messages/sig-architecture)
|
||||
- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture)
|
||||
|
||||
### Code of conduct
|
||||
|
||||
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
|
||||
|
||||
----
|
||||
|
||||
glog
|
||||
====
|
||||
|
||||
|
|
@ -26,20 +52,20 @@ The comment from glog.go introduces the ideas:
|
|||
Error, Fatal, plus formatting variants such as Infof. It
|
||||
also provides V-style logging controlled by the -v and
|
||||
-vmodule=file=2 flags.
|
||||
|
||||
|
||||
Basic examples:
|
||||
|
||||
|
||||
glog.Info("Prepare to repel boarders")
|
||||
|
||||
|
||||
glog.Fatalf("Initialization failed: %s", err)
|
||||
|
||||
|
||||
See the documentation for the V function for an explanation
|
||||
of these examples:
|
||||
|
||||
|
||||
if glog.V(2) {
|
||||
glog.Info("Starting transaction...")
|
||||
}
|
||||
|
||||
|
||||
glog.V(2).Infoln("Processed", nItems, "elements")
|
||||
|
||||
|
||||
|
|
|
|||
3
vendor/k8s.io/klog/code-of-conduct.md
generated
vendored
Normal file
3
vendor/k8s.io/klog/code-of-conduct.md
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Kubernetes Community Code of Conduct
|
||||
|
||||
Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md)
|
||||
16
vendor/k8s.io/klog/klog.go
generated
vendored
16
vendor/k8s.io/klog/klog.go
generated
vendored
|
|
@ -43,7 +43,7 @@
|
|||
// Logs are written to standard error instead of to files.
|
||||
// -alsologtostderr=false
|
||||
// Logs are written to standard error as well as to files.
|
||||
// -stderrthreshold=ERROR
|
||||
// -stderrthreshold=INFO
|
||||
// Log events at or above this severity are logged to standard
|
||||
// error as well as to files.
|
||||
// -log_dir=""
|
||||
|
|
@ -396,8 +396,8 @@ type flushSyncWriter interface {
|
|||
}
|
||||
|
||||
func init() {
|
||||
// Default stderrThreshold is ERROR.
|
||||
logging.stderrThreshold = errorLog
|
||||
// Default stderrThreshold is INFO.
|
||||
logging.stderrThreshold = infoLog
|
||||
|
||||
logging.setVState(0, nil, false)
|
||||
go logging.flushDaemon()
|
||||
|
|
@ -410,9 +410,9 @@ func InitFlags(flagset *flag.FlagSet) {
|
|||
}
|
||||
flagset.StringVar(&logging.logDir, "log_dir", "", "If non-empty, write log files in this directory")
|
||||
flagset.StringVar(&logging.logFile, "log_file", "", "If non-empty, use this log file")
|
||||
flagset.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files")
|
||||
flagset.BoolVar(&logging.toStderr, "logtostderr", true, "log to standard error instead of files")
|
||||
flagset.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files")
|
||||
flagset.Var(&logging.verbosity, "v", "log level for V logs")
|
||||
flagset.Var(&logging.verbosity, "v", "number for the log level verbosity")
|
||||
flagset.BoolVar(&logging.skipHeaders, "skip_headers", false, "If true, avoid header prefixes in the log messages")
|
||||
flagset.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr")
|
||||
flagset.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging")
|
||||
|
|
@ -739,7 +739,9 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo
|
|||
}
|
||||
data := buf.Bytes()
|
||||
if l.toStderr {
|
||||
os.Stderr.Write(data)
|
||||
if s >= l.stderrThreshold.get() {
|
||||
os.Stderr.Write(data)
|
||||
}
|
||||
} else {
|
||||
if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() {
|
||||
os.Stderr.Write(data)
|
||||
|
|
@ -934,7 +936,7 @@ func (l *loggingT) createFiles(sev severity) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
const flushInterval = 30 * time.Second
|
||||
const flushInterval = 5 * time.Second
|
||||
|
||||
// flushDaemon periodically flushes the log file buffers.
|
||||
func (l *loggingT) flushDaemon() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue