top

Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. It provides functions Info, Warning, 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")

Log output is buffered and written periodically using Flush. Programs should call Flush before exiting to guarantee all log output is written.

By default, all log statements write to files in a temporary directory. This package provides several flags that modify this behavior. As a result, flag.Parse must be called before any logging is done.

	-logtostderr=false
		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
		Log events at or above this severity are logged to standard
		error as well as to files.
	-log_dir=""
		Log files will be written to this directory instead of the
		default temporary directory.
 -log_id=""
     The provided id will be used in log file names in place of timestamp and
     pid.

	Other flags provide aids to debugging.

	-log_backtrace_at=""
		When set to a file and line number holding a logging statement,
		such as
			-log_backtrace_at=gopherflakes.go:234
		a stack trace will be written to the Info log whenever execution
		hits that statement. (Unlike with -vmodule, the ".go" must be
		present.)
	-v=0
		Enable V-leveled logging at the specified level.
	-vmodule=""
		The syntax of the argument is a comma-separated list of pattern=N,
		where pattern is a literal file name (minus the ".go" suffix) or
		"glob" pattern and N is a V level. For instance,
			-vmodule=gopher*=3
		sets the V level to 3 in all Go files whose names begin "gopher".

Imported by 170 package(s)

  1. github.com/google/skia-buildbot
  2. github.com/google/skia-buildbot/go/android_hashlookup
  3. github.com/google/skia-buildbot/go/androidbuild
  4. github.com/google/skia-buildbot/go/auth
  5. github.com/google/skia-buildbot/go/boltutil
  6. github.com/google/skia-buildbot/go/buildbot
  7. github.com/google/skia-buildbot/go/buildbucket/generate
  8. github.com/google/skia-buildbot/go/buildskia
  9. github.com/google/skia-buildbot/go/buildskia/skia_build
  10. github.com/google/skia-buildbot/go/common
  11. github.com/google/skia-buildbot/go/cq
  12. github.com/google/skia-buildbot/go/cq/generate
  13. github.com/google/skia-buildbot/go/database
  14. github.com/google/skia-buildbot/go/eventbus
  15. github.com/google/skia-buildbot/go/exec
  16. github.com/google/skia-buildbot/go/filetilestore
  17. github.com/google/skia-buildbot/go/fileutil
  18. github.com/google/skia-buildbot/go/gerrit
  19. github.com/google/skia-buildbot/go/git
  20. github.com/google/skia-buildbot/go/git/gitinfo
  21. github.com/google/skia-buildbot/go/git/repograph
  22. github.com/google/skia-buildbot/go/gitinfo
  23. github.com/google/skia-buildbot/go/gitrepo
  24. github.com/google/skia-buildbot/go/grpclog
  25. github.com/google/skia-buildbot/go/gs
  26. github.com/google/skia-buildbot/go/httputils
  27. github.com/google/skia-buildbot/go/human
  28. github.com/google/skia-buildbot/go/ingestion
  29. github.com/google/skia-buildbot/go/issues
  30. github.com/google/skia-buildbot/go/issues/issues_helper
  31. github.com/google/skia-buildbot/go/login
  32. github.com/google/skia-buildbot/go/metadata
  33. github.com/google/skia-buildbot/go/metrics2
  34. github.com/google/skia-buildbot/go/packages
  35. github.com/google/skia-buildbot/go/polling_status
  36. github.com/google/skia-buildbot/go/redisutil
  37. github.com/google/skia-buildbot/go/rietveld
  38. github.com/google/skia-buildbot/go/skiaversion
  39. github.com/google/skia-buildbot/go/sklog
  40. github.com/google/skia-buildbot/go/swarming
  41. github.com/google/skia-buildbot/go/timer
  42. github.com/google/skia-buildbot/go/util
  43. github.com/google/skia-buildbot/go/webhook
  44. github.com/google/skia-buildbot/golden/go/correctness_migratedb
  45. github.com/google/skia-buildbot/golden/go/diff
  46. github.com/google/skia-buildbot/golden/go/diffstore
  47. github.com/google/skia-buildbot/golden/go/digesttools
  48. github.com/google/skia-buildbot/golden/go/expstorage
  49. github.com/google/skia-buildbot/golden/go/filediffstore
  50. github.com/google/skia-buildbot/golden/go/goldingestion
  51. github.com/google/skia-buildbot/golden/go/history
  52. github.com/google/skia-buildbot/golden/go/ignore
  53. github.com/google/skia-buildbot/golden/go/indexer
  54. github.com/google/skia-buildbot/golden/go/mocks
  55. github.com/google/skia-buildbot/golden/go/pdag
  56. github.com/google/skia-buildbot/golden/go/pdfingestion
  57. github.com/google/skia-buildbot/golden/go/sampler
  58. github.com/google/skia-buildbot/golden/go/skiacorrectness
  59. github.com/google/skia-buildbot/golden/go/status
  60. github.com/google/skia-buildbot/golden/go/storage
  61. github.com/google/skia-buildbot/golden/go/summary
  62. github.com/google/skia-buildbot/golden/go/trybot
  63. github.com/google/skia-buildbot/golden/go/warmer
  64. github.com/google/skia-buildbot/perf/go/activitylog
  65. github.com/google/skia-buildbot/perf/go/alerting
  66. github.com/google/skia-buildbot/perf/go/annotate
  67. github.com/google/skia-buildbot/perf/go/cid
  68. github.com/google/skia-buildbot/perf/go/clustering
  69. github.com/google/skia-buildbot/perf/go/clustering2
  70. github.com/google/skia-buildbot/perf/go/dataframe
  71. github.com/google/skia-buildbot/perf/go/ingest
  72. github.com/google/skia-buildbot/perf/go/perf_migratedb
  73. github.com/google/skia-buildbot/perf/go/perfingestion
  74. github.com/google/skia-buildbot/perf/go/ptraceingest
  75. github.com/google/skia-buildbot/perf/go/ptracequery
  76. github.com/google/skia-buildbot/perf/go/ptracestore
  77. github.com/google/skia-buildbot/perf/go/skiaperf
  78. github.com/google/skia-buildbot/perf/go/stats
  79. github.com/google/skia-buildbot/perf/go/tilestats
  80. github.com/google/skia-buildbot/perf/go/tiletool
  81. github.com/google/skia-buildbot/scripts
  82. github.com/google/skia-buildbot/scripts/run_on_swarming_bots
  83. github.com/google/skia-buildbot/scripts/run_swarming_tasks_api
  84. github.com/google/skia-buildbot/scripts/shutdown_swarming_bots
  85. github.com/jcgregorio/home/room-temp-monitor/go/tempmon
  86. github.com/jcgregorio/math/go/mathserv
  87. go.skia.org/infra
  88. go.skia.org/infra/go/androidbuild
  89. go.skia.org/infra/go/auth
  90. go.skia.org/infra/go/boltutil
  91. go.skia.org/infra/go/buildbot
  92. go.skia.org/infra/go/buildskia
  93. go.skia.org/infra/go/buildskia/cmakebuild
  94. go.skia.org/infra/go/buildskia/skia_build
  95. go.skia.org/infra/go/common
  96. go.skia.org/infra/go/cq
  97. go.skia.org/infra/go/cq/generate
  98. go.skia.org/infra/go/database
  99. go.skia.org/infra/go/eventbus
  100. go.skia.org/infra/go/fileutil
  101. go.skia.org/infra/go/git
  102. go.skia.org/infra/go/git/gitinfo
  103. go.skia.org/infra/go/git/repograph
  104. go.skia.org/infra/go/gitinfo
  105. go.skia.org/infra/go/gitrepo
  106. go.skia.org/infra/go/grpclog
  107. go.skia.org/infra/go/httputils
  108. go.skia.org/infra/go/ingester
  109. go.skia.org/infra/go/ingestion
  110. go.skia.org/infra/go/issues/issues_helper
  111. go.skia.org/infra/go/issues/query_issues
  112. go.skia.org/infra/go/login
  113. go.skia.org/infra/go/metadata
  114. go.skia.org/infra/go/metrics2
  115. go.skia.org/infra/go/packages
  116. go.skia.org/infra/go/polling_status
  117. go.skia.org/infra/go/redisutil
  118. go.skia.org/infra/go/rietveld
  119. go.skia.org/infra/go/skiaversion
  120. go.skia.org/infra/go/sklog
  121. go.skia.org/infra/go/swarming
  122. go.skia.org/infra/go/timer
  123. go.skia.org/infra/go/trace/db
  124. go.skia.org/infra/go/util
  125. go.skia.org/infra/golden/go/analysis
  126. go.skia.org/infra/golden/go/diffstore
  127. go.skia.org/infra/golden/go/digesttools
  128. go.skia.org/infra/golden/go/expstorage
  129. go.skia.org/infra/golden/go/filediffstore
  130. go.skia.org/infra/golden/go/goldingester
  131. go.skia.org/infra/golden/go/goldingestion
  132. go.skia.org/infra/golden/go/ignore
  133. go.skia.org/infra/golden/go/indexer
  134. go.skia.org/infra/golden/go/pdag
  135. go.skia.org/infra/golden/go/pdfxform
  136. go.skia.org/infra/golden/go/sampler
  137. go.skia.org/infra/golden/go/search
  138. go.skia.org/infra/golden/go/status
  139. go.skia.org/infra/golden/go/storage
  140. go.skia.org/infra/golden/go/summary
  141. go.skia.org/infra/golden/go/trybot
  142. go.skia.org/infra/golden/go/warmer
  143. go.skia.org/infra/grandcentral/go/event_viewer
  144. go.skia.org/infra/grandcentral/go/grandcentral
  145. go.skia.org/infra/perf/go/activitylog
  146. go.skia.org/infra/perf/go/alerting
  147. go.skia.org/infra/perf/go/annotate
  148. go.skia.org/infra/perf/go/cid
  149. go.skia.org/infra/perf/go/clustering
  150. go.skia.org/infra/perf/go/dataframe
  151. go.skia.org/infra/perf/go/filetilestore
  152. go.skia.org/infra/perf/go/goldingester
  153. go.skia.org/infra/perf/go/ingest
  154. go.skia.org/infra/perf/go/ingester
  155. go.skia.org/infra/perf/go/perfingester
  156. go.skia.org/infra/perf/go/perfingestion
  157. go.skia.org/infra/perf/go/ptraceingest
  158. go.skia.org/infra/perf/go/ptracequery
  159. go.skia.org/infra/perf/go/ptracestore
  160. go.skia.org/infra/perf/go/stats
  161. go.skia.org/infra/perf/go/tilestats
  162. go.skia.org/infra/perf/go/tiletool
  163. go.skia.org/infra/perf/go/trybot
  164. go.skia.org/infra/scripts
  165. go.skia.org/infra/scripts/run_on_swarming_bots
  166. go.skia.org/infra/scripts/shutdown_swarming_bots
  167. skia.googlesource.com/buildbot.git/go/common
  168. skia.googlesource.com/buildbot.git/go/metrics2
  169. skia.googlesource.com/buildbot.git/go/sklog
  170. skia.googlesource.com/buildbot.git/go/swarming

Imported only in test by 1 package(s)

  1. github.com/google/skia-buildbot/go/pdf