mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdmain: fix logging flag documentation
This commit is contained in:
parent
2299e35d99
commit
ad8e3ea5dc
@ -149,6 +149,17 @@ The security flags help to [build a secure etcd cluster][security].
|
||||
+ Path to the peer server TLS trusted CA file.
|
||||
+ default: none
|
||||
|
||||
### Logging Flags
|
||||
|
||||
##### -debug
|
||||
+ Drop the default log level to DEBUG for all subpackages.
|
||||
+ default: false (INFO for all packages)
|
||||
|
||||
##### -log-package-levels
|
||||
+ Set individual etcd subpackages to specific log levels. An example being `etcdserver=WARNING,security=DEBUG`
|
||||
+ default: none (INFO for all packages)
|
||||
|
||||
|
||||
### Unsafe Flags
|
||||
|
||||
Please be CAUTIOUS when using unsafe flags because it will break the guarantees given by the consensus protocol.
|
||||
|
@ -96,8 +96,8 @@ type config struct {
|
||||
clientTLSInfo, peerTLSInfo transport.TLSInfo
|
||||
|
||||
// logging
|
||||
debug bool
|
||||
logPkgs string
|
||||
debug bool
|
||||
logPkgLevels string
|
||||
|
||||
// unsafe
|
||||
forceNewCluster bool
|
||||
@ -185,7 +185,7 @@ func NewConfig() *config {
|
||||
|
||||
// logging
|
||||
fs.BoolVar(&cfg.debug, "debug", false, "Enable debug output to the logs.")
|
||||
fs.StringVar(&cfg.logPkgs, "log-packages", "", "Specify a particular log level for each etcd package.")
|
||||
fs.StringVar(&cfg.logPkgLevels, "log-package-levels", "", "Specify a particular log level for each etcd package.")
|
||||
|
||||
// unsafe
|
||||
fs.BoolVar(&cfg.forceNewCluster, "force-new-cluster", false, "Force to create a new one member cluster")
|
||||
|
@ -399,9 +399,9 @@ func setupLogging(cfg *config) {
|
||||
if cfg.debug {
|
||||
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
||||
}
|
||||
if cfg.logPkgs != "" {
|
||||
if cfg.logPkgLevels != "" {
|
||||
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
|
||||
settings, err := repoLog.ParseLogLevelConfig(cfg.logPkgs)
|
||||
settings, err := repoLog.ParseLogLevelConfig(cfg.logPkgLevels)
|
||||
if err != nil {
|
||||
log.Warningf("Couldn't parse log level string: %s, continuing with default levels", err.Error())
|
||||
return
|
||||
|
@ -48,7 +48,7 @@ member flags:
|
||||
clustering flags:
|
||||
|
||||
--initial-advertise-peer-urls 'http://localhost:2380,http://localhost:7001'
|
||||
list of this member's peer URLs to advertise to the rest of the cluster.
|
||||
list of this member's peer URLs to advertise to the rest of the cluster.
|
||||
--initial-cluster 'default=http://localhost:2380,default=http://localhost:7001'
|
||||
initial cluster configuration for bootstrapping.
|
||||
--initial-cluster-state 'new'
|
||||
@ -96,12 +96,18 @@ security flags:
|
||||
--peer-trusted-ca-file ''
|
||||
path to the peer server TLS trusted CA file.
|
||||
|
||||
logging flags
|
||||
|
||||
--debug 'false'
|
||||
enable debug-level logging for etcd.
|
||||
--log-package-levels ''
|
||||
set individual packages to various log levels (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG')
|
||||
|
||||
unsafe flags:
|
||||
|
||||
Please be CAUTIOUS when using unsafe flags because it will break the guarantees
|
||||
given by the consensus protocol.
|
||||
|
||||
|
||||
--force-new-cluster 'false'
|
||||
force to create a new one-member cluster.
|
||||
`
|
||||
|
Loading…
x
Reference in New Issue
Block a user