summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Tune <etune@google.com>2014-10-16 14:45:16 -0700
committerEric Tune <etune@google.com>2014-10-31 08:35:53 -0700
commit3306aecc13331d26f59b36e282278707769d1f90 (patch)
treebc2fcb1f8bd727af581995e9f465e5771030e2a5
parentcf8e52e4286fc67c50a28432ce398ce2359ed527 (diff)
Separated user, dev, and design docs.
Renamed: logging.md -> devel/logging.m Renamed: access.md -> design/access.md Renamed: identifiers.md -> design/identifiers.md Renamed: labels.md -> design/labels.md Renamed: namespaces.md -> design/namespaces.md Renamed: security.md -> design/security.md Renamed: networking.md -> design/networking.md Added abbreviated user user-focused document in place of most moved docs. Added docs/README.md explains how docs are organized. Added short, user-oriented documentation on labels Added a glossary. Fixed up some links.
-rw-r--r--logging.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/logging.md b/logging.md
new file mode 100644
index 00000000..9b6bfa2a
--- /dev/null
+++ b/logging.md
@@ -0,0 +1,26 @@
+Logging Conventions
+===================
+
+The following conventions for the glog levels to use. glog is globally prefered to "log" for better runtime control.
+
+* glog.Errorf() - Always an error
+* glog.Warningf() - Something unexpected, but probably not an error
+* glog.Infof() has multiple levels:
+ * glog.V(0) - Generally useful for this to ALWAYS be visible to an operator
+ * Programmer errors
+ * Logging extra info about a panic
+ * CLI argument handling
+ * glog.V(1) - A reasonable default log level if you don't want verbosity.
+ * Information about config (listening on X, watching Y)
+ * Errors that repeat frequently that relate to conditions that can be corrected (pod detected as unhealthy)
+ * glog.V(2) - Useful steady state information about the service and important log messages that may correlate to significant changes in the system. This is the recommended default log level for most systems.
+ * Logging HTTP requests and their exit code
+ * System state changing (killing pod)
+ * Controller state change events (starting pods)
+ * Scheduler log messages
+ * glog.V(3) - Extended information about changes
+ * More info about system state changes
+ * glog.V(4) - Debug level verbosity (for now)
+ * Logging in particularly thorny parts of code where you may want to come back later and check it
+
+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.