You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2160 lines
68 KiB

8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="theme-color" content="#375EAB">
  7. <title>logrus - The Go Programming Language</title>
  8. <link type="text/css" rel="stylesheet" href="../../../../lib/godoc/style.css">
  9. <link rel="stylesheet" href="../../../../lib/godoc/jquery.treeview.css">
  10. <script type="text/javascript">window.initFuncs = [];</script>
  11. </head>
  12. <body>
  13. <div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
  14. ...
  15. </div><!-- #lowframe -->
  16. <div id="topbar" class="wide"><div class="container">
  17. <div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
  18. <div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
  19. <a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
  20. <form method="GET" action="http://localhost:6060/search">
  21. <div id="menu">
  22. <a href="http://localhost:6060/doc/">Documents</a>
  23. <a href="http://localhost:6060/pkg/">Packages</a>
  24. <a href="http://localhost:6060/project/">The Project</a>
  25. <a href="http://localhost:6060/help/">Help</a>
  26. <a href="http://localhost:6060/blog/">Blog</a>
  27. <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
  28. </div>
  29. </form>
  30. </div></div>
  31. <div id="page" class="wide">
  32. <div class="container">
  33. <h1>Package logrus</h1>
  34. <div id="nav"></div>
  35. <!--
  36. Copyright 2009 The Go Authors. All rights reserved.
  37. Use of this source code is governed by a BSD-style
  38. license that can be found in the LICENSE file.
  39. -->
  40. <!--
  41. Note: Static (i.e., not template-generated) href and id
  42. attributes start with "pkg-" to make it impossible for
  43. them to conflict with generated attributes (some of which
  44. correspond to Go identifiers).
  45. -->
  46. <script type='text/javascript'>
  47. document.ANALYSIS_DATA = null;
  48. document.CALLGRAPH = null;
  49. </script>
  50. <div id="short-nav">
  51. <dl>
  52. <dd><code>import "github.com/Sirupsen/logrus"</code></dd>
  53. </dl>
  54. <dl>
  55. <dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
  56. <dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
  57. <dd><a href="index.html#pkg-subdirectories">Subdirectories</a></dd>
  58. </dl>
  59. </div>
  60. <!-- The package's Name is printed as title by the top-level template -->
  61. <div id="pkg-overview" class="toggleVisible">
  62. <div class="collapsed">
  63. <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
  64. </div>
  65. <div class="expanded">
  66. <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
  67. <p>
  68. Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
  69. </p>
  70. <p>
  71. The simplest way to use Logrus is simply the package-level exported logger:
  72. </p>
  73. <pre>package main
  74. import (
  75. log &#34;github.com/Sirupsen/logrus&#34;
  76. )
  77. func main() {
  78. log.WithFields(log.Fields{
  79. &#34;animal&#34;: &#34;walrus&#34;,
  80. &#34;number&#34;: 1,
  81. &#34;size&#34;: 10,
  82. }).Info(&#34;A walrus appears&#34;)
  83. }
  84. </pre>
  85. <p>
  86. Output:
  87. </p>
  88. <pre>time=&#34;2015-09-07T08:48:33Z&#34; level=info msg=&#34;A walrus appears&#34; animal=walrus number=1 size=10
  89. </pre>
  90. <p>
  91. For a full guide visit <a href="https://github.com/Sirupsen/logrus">https://github.com/Sirupsen/logrus</a>
  92. </p>
  93. </div>
  94. </div>
  95. <div id="pkg-index" class="toggleVisible">
  96. <div class="collapsed">
  97. <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
  98. </div>
  99. <div class="expanded">
  100. <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
  101. <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
  102. <div id="manual-nav">
  103. <dl>
  104. <dd><a href="index.html#pkg-constants">Constants</a></dd>
  105. <dd><a href="index.html#pkg-variables">Variables</a></dd>
  106. <dd><a href="index.html#AddHook">func AddHook(hook Hook)</a></dd>
  107. <dd><a href="index.html#Debug">func Debug(args ...interface{})</a></dd>
  108. <dd><a href="index.html#Debugf">func Debugf(format string, args ...interface{})</a></dd>
  109. <dd><a href="index.html#Debugln">func Debugln(args ...interface{})</a></dd>
  110. <dd><a href="index.html#Error">func Error(args ...interface{})</a></dd>
  111. <dd><a href="index.html#Errorf">func Errorf(format string, args ...interface{})</a></dd>
  112. <dd><a href="index.html#Errorln">func Errorln(args ...interface{})</a></dd>
  113. <dd><a href="index.html#Exit">func Exit(code int)</a></dd>
  114. <dd><a href="index.html#Fatal">func Fatal(args ...interface{})</a></dd>
  115. <dd><a href="index.html#Fatalf">func Fatalf(format string, args ...interface{})</a></dd>
  116. <dd><a href="index.html#Fatalln">func Fatalln(args ...interface{})</a></dd>
  117. <dd><a href="index.html#Info">func Info(args ...interface{})</a></dd>
  118. <dd><a href="index.html#Infof">func Infof(format string, args ...interface{})</a></dd>
  119. <dd><a href="index.html#Infoln">func Infoln(args ...interface{})</a></dd>
  120. <dd><a href="index.html#IsTerminal">func IsTerminal() bool</a></dd>
  121. <dd><a href="index.html#Panic">func Panic(args ...interface{})</a></dd>
  122. <dd><a href="index.html#Panicf">func Panicf(format string, args ...interface{})</a></dd>
  123. <dd><a href="index.html#Panicln">func Panicln(args ...interface{})</a></dd>
  124. <dd><a href="index.html#Print">func Print(args ...interface{})</a></dd>
  125. <dd><a href="index.html#Printf">func Printf(format string, args ...interface{})</a></dd>
  126. <dd><a href="index.html#Println">func Println(args ...interface{})</a></dd>
  127. <dd><a href="index.html#RegisterExitHandler">func RegisterExitHandler(handler func())</a></dd>
  128. <dd><a href="index.html#SetFormatter">func SetFormatter(formatter Formatter)</a></dd>
  129. <dd><a href="index.html#SetLevel">func SetLevel(level Level)</a></dd>
  130. <dd><a href="index.html#SetOutput">func SetOutput(out io.Writer)</a></dd>
  131. <dd><a href="index.html#Warn">func Warn(args ...interface{})</a></dd>
  132. <dd><a href="index.html#Warnf">func Warnf(format string, args ...interface{})</a></dd>
  133. <dd><a href="index.html#Warning">func Warning(args ...interface{})</a></dd>
  134. <dd><a href="index.html#Warningf">func Warningf(format string, args ...interface{})</a></dd>
  135. <dd><a href="index.html#Warningln">func Warningln(args ...interface{})</a></dd>
  136. <dd><a href="index.html#Warnln">func Warnln(args ...interface{})</a></dd>
  137. <dd><a href="index.html#Entry">type Entry</a></dd>
  138. <dd>&nbsp; &nbsp; <a href="index.html#NewEntry">func NewEntry(logger *Logger) *Entry</a></dd>
  139. <dd>&nbsp; &nbsp; <a href="index.html#WithError">func WithError(err error) *Entry</a></dd>
  140. <dd>&nbsp; &nbsp; <a href="index.html#WithField">func WithField(key string, value interface{}) *Entry</a></dd>
  141. <dd>&nbsp; &nbsp; <a href="index.html#WithFields">func WithFields(fields Fields) *Entry</a></dd>
  142. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Debug">func (entry *Entry) Debug(args ...interface{})</a></dd>
  143. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Debugf">func (entry *Entry) Debugf(format string, args ...interface{})</a></dd>
  144. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Debugln">func (entry *Entry) Debugln(args ...interface{})</a></dd>
  145. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Error">func (entry *Entry) Error(args ...interface{})</a></dd>
  146. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Errorf">func (entry *Entry) Errorf(format string, args ...interface{})</a></dd>
  147. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Errorln">func (entry *Entry) Errorln(args ...interface{})</a></dd>
  148. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Fatal">func (entry *Entry) Fatal(args ...interface{})</a></dd>
  149. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Fatalf">func (entry *Entry) Fatalf(format string, args ...interface{})</a></dd>
  150. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Fatalln">func (entry *Entry) Fatalln(args ...interface{})</a></dd>
  151. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Info">func (entry *Entry) Info(args ...interface{})</a></dd>
  152. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Infof">func (entry *Entry) Infof(format string, args ...interface{})</a></dd>
  153. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Infoln">func (entry *Entry) Infoln(args ...interface{})</a></dd>
  154. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Panic">func (entry *Entry) Panic(args ...interface{})</a></dd>
  155. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Panicf">func (entry *Entry) Panicf(format string, args ...interface{})</a></dd>
  156. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Panicln">func (entry *Entry) Panicln(args ...interface{})</a></dd>
  157. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Print">func (entry *Entry) Print(args ...interface{})</a></dd>
  158. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Printf">func (entry *Entry) Printf(format string, args ...interface{})</a></dd>
  159. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Println">func (entry *Entry) Println(args ...interface{})</a></dd>
  160. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Reader">func (entry *Entry) Reader() (*bytes.Buffer, error)</a></dd>
  161. <dd>&nbsp; &nbsp; <a href="index.html#Entry.String">func (entry *Entry) String() (string, error)</a></dd>
  162. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warn">func (entry *Entry) Warn(args ...interface{})</a></dd>
  163. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warnf">func (entry *Entry) Warnf(format string, args ...interface{})</a></dd>
  164. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warning">func (entry *Entry) Warning(args ...interface{})</a></dd>
  165. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warningf">func (entry *Entry) Warningf(format string, args ...interface{})</a></dd>
  166. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warningln">func (entry *Entry) Warningln(args ...interface{})</a></dd>
  167. <dd>&nbsp; &nbsp; <a href="index.html#Entry.Warnln">func (entry *Entry) Warnln(args ...interface{})</a></dd>
  168. <dd>&nbsp; &nbsp; <a href="index.html#Entry.WithError">func (entry *Entry) WithError(err error) *Entry</a></dd>
  169. <dd>&nbsp; &nbsp; <a href="index.html#Entry.WithField">func (entry *Entry) WithField(key string, value interface{}) *Entry</a></dd>
  170. <dd>&nbsp; &nbsp; <a href="index.html#Entry.WithFields">func (entry *Entry) WithFields(fields Fields) *Entry</a></dd>
  171. <dd><a href="index.html#FieldLogger">type FieldLogger</a></dd>
  172. <dd><a href="index.html#Fields">type Fields</a></dd>
  173. <dd><a href="index.html#Formatter">type Formatter</a></dd>
  174. <dd><a href="index.html#Hook">type Hook</a></dd>
  175. <dd><a href="index.html#JSONFormatter">type JSONFormatter</a></dd>
  176. <dd>&nbsp; &nbsp; <a href="index.html#JSONFormatter.Format">func (f *JSONFormatter) Format(entry *Entry) ([]byte, error)</a></dd>
  177. <dd><a href="index.html#Level">type Level</a></dd>
  178. <dd>&nbsp; &nbsp; <a href="index.html#GetLevel">func GetLevel() Level</a></dd>
  179. <dd>&nbsp; &nbsp; <a href="index.html#ParseLevel">func ParseLevel(lvl string) (Level, error)</a></dd>
  180. <dd>&nbsp; &nbsp; <a href="index.html#Level.String">func (level Level) String() string</a></dd>
  181. <dd><a href="index.html#LevelHooks">type LevelHooks</a></dd>
  182. <dd>&nbsp; &nbsp; <a href="index.html#LevelHooks.Add">func (hooks LevelHooks) Add(hook Hook)</a></dd>
  183. <dd>&nbsp; &nbsp; <a href="index.html#LevelHooks.Fire">func (hooks LevelHooks) Fire(level Level, entry *Entry) error</a></dd>
  184. <dd><a href="index.html#Logger">type Logger</a></dd>
  185. <dd>&nbsp; &nbsp; <a href="index.html#New">func New() *Logger</a></dd>
  186. <dd>&nbsp; &nbsp; <a href="index.html#StandardLogger">func StandardLogger() *Logger</a></dd>
  187. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Debug">func (logger *Logger) Debug(args ...interface{})</a></dd>
  188. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Debugf">func (logger *Logger) Debugf(format string, args ...interface{})</a></dd>
  189. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Debugln">func (logger *Logger) Debugln(args ...interface{})</a></dd>
  190. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Error">func (logger *Logger) Error(args ...interface{})</a></dd>
  191. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Errorf">func (logger *Logger) Errorf(format string, args ...interface{})</a></dd>
  192. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Errorln">func (logger *Logger) Errorln(args ...interface{})</a></dd>
  193. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Fatal">func (logger *Logger) Fatal(args ...interface{})</a></dd>
  194. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Fatalf">func (logger *Logger) Fatalf(format string, args ...interface{})</a></dd>
  195. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Fatalln">func (logger *Logger) Fatalln(args ...interface{})</a></dd>
  196. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Info">func (logger *Logger) Info(args ...interface{})</a></dd>
  197. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Infof">func (logger *Logger) Infof(format string, args ...interface{})</a></dd>
  198. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Infoln">func (logger *Logger) Infoln(args ...interface{})</a></dd>
  199. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Panic">func (logger *Logger) Panic(args ...interface{})</a></dd>
  200. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Panicf">func (logger *Logger) Panicf(format string, args ...interface{})</a></dd>
  201. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Panicln">func (logger *Logger) Panicln(args ...interface{})</a></dd>
  202. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Print">func (logger *Logger) Print(args ...interface{})</a></dd>
  203. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Printf">func (logger *Logger) Printf(format string, args ...interface{})</a></dd>
  204. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Println">func (logger *Logger) Println(args ...interface{})</a></dd>
  205. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warn">func (logger *Logger) Warn(args ...interface{})</a></dd>
  206. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warnf">func (logger *Logger) Warnf(format string, args ...interface{})</a></dd>
  207. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warning">func (logger *Logger) Warning(args ...interface{})</a></dd>
  208. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warningf">func (logger *Logger) Warningf(format string, args ...interface{})</a></dd>
  209. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warningln">func (logger *Logger) Warningln(args ...interface{})</a></dd>
  210. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Warnln">func (logger *Logger) Warnln(args ...interface{})</a></dd>
  211. <dd>&nbsp; &nbsp; <a href="index.html#Logger.WithError">func (logger *Logger) WithError(err error) *Entry</a></dd>
  212. <dd>&nbsp; &nbsp; <a href="index.html#Logger.WithField">func (logger *Logger) WithField(key string, value interface{}) *Entry</a></dd>
  213. <dd>&nbsp; &nbsp; <a href="index.html#Logger.WithFields">func (logger *Logger) WithFields(fields Fields) *Entry</a></dd>
  214. <dd>&nbsp; &nbsp; <a href="index.html#Logger.Writer">func (logger *Logger) Writer() *io.PipeWriter</a></dd>
  215. <dd>&nbsp; &nbsp; <a href="index.html#Logger.WriterLevel">func (logger *Logger) WriterLevel(level Level) *io.PipeWriter</a></dd>
  216. <dd><a href="index.html#StdLogger">type StdLogger</a></dd>
  217. <dd><a href="index.html#Termios">type Termios</a></dd>
  218. <dd><a href="index.html#TextFormatter">type TextFormatter</a></dd>
  219. <dd>&nbsp; &nbsp; <a href="index.html#TextFormatter.Format">func (f *TextFormatter) Format(entry *Entry) ([]byte, error)</a></dd>
  220. </dl>
  221. </div><!-- #manual-nav -->
  222. <h4>Package files</h4>
  223. <p>
  224. <span style="font-size:90%">
  225. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/alt_exit.go">alt_exit.go</a>
  226. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/doc.go">doc.go</a>
  227. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go">entry.go</a>
  228. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go">exported.go</a>
  229. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/formatter.go">formatter.go</a>
  230. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/hooks.go">hooks.go</a>
  231. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/json_formatter.go">json_formatter.go</a>
  232. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go">logger.go</a>
  233. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go">logrus.go</a>
  234. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/terminal_linux.go">terminal_linux.go</a>
  235. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/terminal_notwindows.go">terminal_notwindows.go</a>
  236. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/text_formatter.go">text_formatter.go</a>
  237. <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/writer.go">writer.go</a>
  238. </span>
  239. </p>
  240. </div><!-- .expanded -->
  241. </div><!-- #pkg-index -->
  242. <div id="pkg-callgraph" class="toggle" style="display: none">
  243. <div class="collapsed">
  244. <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
  245. </div> <!-- .expanded -->
  246. <div class="expanded">
  247. <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
  248. <p>
  249. In the call graph viewer below, each node
  250. is a function belonging to this package
  251. and its children are the functions it
  252. calls&mdash;perhaps dynamically.
  253. </p>
  254. <p>
  255. The root nodes are the entry points of the
  256. package: functions that may be called from
  257. outside the package.
  258. There may be non-exported or anonymous
  259. functions among them if they are called
  260. dynamically from another package.
  261. </p>
  262. <p>
  263. Click a node to visit that function's source code.
  264. From there you can visit its callers by
  265. clicking its declaring <code>func</code>
  266. token.
  267. </p>
  268. <p>
  269. Functions may be omitted if they were
  270. determined to be unreachable in the
  271. particular programs or tests that were
  272. analyzed.
  273. </p>
  274. <!-- Zero means show all package entry points. -->
  275. <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
  276. </div>
  277. </div> <!-- #pkg-callgraph -->
  278. <h2 id="pkg-constants">Constants</h2>
  279. <pre>const <span id="DefaultTimestampFormat">DefaultTimestampFormat</span> = <a href="../../../time/index.html">time</a>.<a href="../../../time/index.html#RFC3339">RFC3339</a></pre>
  280. <h2 id="pkg-variables">Variables</h2>
  281. <pre>var <span id="AllLevels">AllLevels</span> = []<a href="index.html#Level">Level</a>{
  282. <a href="index.html#PanicLevel">PanicLevel</a>,
  283. <a href="index.html#FatalLevel">FatalLevel</a>,
  284. <a href="index.html#ErrorLevel">ErrorLevel</a>,
  285. <a href="index.html#WarnLevel">WarnLevel</a>,
  286. <a href="index.html#InfoLevel">InfoLevel</a>,
  287. <a href="index.html#DebugLevel">DebugLevel</a>,
  288. }</pre>
  289. <p>
  290. A constant exposing all logging levels
  291. </p>
  292. <pre>var <span id="ErrorKey">ErrorKey</span> = &#34;error&#34;</pre>
  293. <p>
  294. Defines the key when adding errors using WithError.
  295. </p>
  296. <h2 id="AddHook">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=773:796#L35">AddHook</a></h2>
  297. <pre>func AddHook(hook <a href="index.html#Hook">Hook</a>)</pre>
  298. <p>
  299. AddHook adds a hook to the standard logger hooks.
  300. </p>
  301. <h2 id="Debug">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=1816:1847#L66">Debug</a></h2>
  302. <pre>func Debug(args ...interface{})</pre>
  303. <p>
  304. Debug logs a message at level Debug on the standard logger.
  305. </p>
  306. <h2 id="Debugf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2773:2820#L106">Debugf</a></h2>
  307. <pre>func Debugf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  308. <p>
  309. Debugf logs a message at level Debug on the standard logger.
  310. </p>
  311. <h2 id="Debugln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3938:3971#L146">Debugln</a></h2>
  312. <pre>func Debugln(args ...interface{})</pre>
  313. <p>
  314. Debugln logs a message at level Debug on the standard logger.
  315. </p>
  316. <h2 id="Error">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2412:2443#L91">Error</a></h2>
  317. <pre>func Error(args ...interface{})</pre>
  318. <p>
  319. Error logs a message at level Error on the standard logger.
  320. </p>
  321. <h2 id="Errorf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3499:3546#L131">Errorf</a></h2>
  322. <pre>func Errorf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  323. <p>
  324. Errorf logs a message at level Error on the standard logger.
  325. </p>
  326. <h2 id="Errorln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4564:4597#L171">Errorln</a></h2>
  327. <pre>func Errorln(args ...interface{})</pre>
  328. <p>
  329. Errorln logs a message at level Error on the standard logger.
  330. </p>
  331. <h2 id="Exit">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/alt_exit.go?s=1701:1720#L39">Exit</a></h2>
  332. <pre>func Exit(code <a href="../../../builtin/index.html#int">int</a>)</pre>
  333. <p>
  334. Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
  335. </p>
  336. <h2 id="Fatal">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2652:2683#L101">Fatal</a></h2>
  337. <pre>func Fatal(args ...interface{})</pre>
  338. <p>
  339. Fatal logs a message at level Fatal on the standard logger.
  340. </p>
  341. <h2 id="Fatalf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3791:3838#L141">Fatalf</a></h2>
  342. <pre>func Fatalf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  343. <p>
  344. Fatalf logs a message at level Fatal on the standard logger.
  345. </p>
  346. <h2 id="Fatalln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4816:4849#L181">Fatalln</a></h2>
  347. <pre>func Fatalln(args ...interface{})</pre>
  348. <p>
  349. Fatalln logs a message at level Fatal on the standard logger.
  350. </p>
  351. <h2 id="Info">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2053:2083#L76">Info</a></h2>
  352. <pre>func Info(args ...interface{})</pre>
  353. <p>
  354. Info logs a message at level Info on the standard logger.
  355. </p>
  356. <h2 id="Infof">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3062:3108#L116">Infof</a></h2>
  357. <pre>func Infof(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  358. <p>
  359. Infof logs a message at level Info on the standard logger.
  360. </p>
  361. <h2 id="Infoln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4187:4219#L156">Infoln</a></h2>
  362. <pre>func Infoln(args ...interface{})</pre>
  363. <p>
  364. Infoln logs a message at level Info on the standard logger.
  365. </p>
  366. <h2 id="IsTerminal">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/terminal_notwindows.go?s=362:384#L6">IsTerminal</a></h2>
  367. <pre>func IsTerminal() <a href="../../../builtin/index.html#bool">bool</a></pre>
  368. <p>
  369. IsTerminal returns true if stderr&#39;s file descriptor is a terminal.
  370. </p>
  371. <h2 id="Panic">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2532:2563#L96">Panic</a></h2>
  372. <pre>func Panic(args ...interface{})</pre>
  373. <p>
  374. Panic logs a message at level Panic on the standard logger.
  375. </p>
  376. <h2 id="Panicf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3645:3692#L136">Panicf</a></h2>
  377. <pre>func Panicf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  378. <p>
  379. Panicf logs a message at level Panic on the standard logger.
  380. </p>
  381. <h2 id="Panicln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4690:4723#L176">Panicln</a></h2>
  382. <pre>func Panicln(args ...interface{})</pre>
  383. <p>
  384. Panicln logs a message at level Panic on the standard logger.
  385. </p>
  386. <h2 id="Print">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=1935:1966#L71">Print</a></h2>
  387. <pre>func Print(args ...interface{})</pre>
  388. <p>
  389. Print logs a message at level Info on the standard logger.
  390. </p>
  391. <h2 id="Printf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2918:2965#L111">Printf</a></h2>
  392. <pre>func Printf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  393. <p>
  394. Printf logs a message at level Info on the standard logger.
  395. </p>
  396. <h2 id="Println">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4063:4096#L151">Println</a></h2>
  397. <pre>func Println(args ...interface{})</pre>
  398. <p>
  399. Println logs a message at level Info on the standard logger.
  400. </p>
  401. <h2 id="RegisterExitHandler">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/alt_exit.go?s=2166:2206#L52">RegisterExitHandler</a></h2>
  402. <pre>func RegisterExitHandler(handler func())</pre>
  403. <p>
  404. RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
  405. all handlers. The handlers will also be invoked when any Fatal log entry is
  406. made.
  407. </p>
  408. <p>
  409. This method is useful when a caller wishes to use logrus to log a fatal
  410. message but also needs to gracefully shutdown. An example usecase could be
  411. closing database connections, or sending a alert that the application is
  412. closing.
  413. </p>
  414. <h2 id="SetFormatter">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=348:386#L14">SetFormatter</a></h2>
  415. <pre>func SetFormatter(formatter <a href="index.html#Formatter">Formatter</a>)</pre>
  416. <p>
  417. SetFormatter sets the standard logger formatter.
  418. </p>
  419. <h2 id="SetLevel">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=501:527#L21">SetLevel</a></h2>
  420. <pre>func SetLevel(level <a href="index.html#Level">Level</a>)</pre>
  421. <p>
  422. SetLevel sets the standard logger level.
  423. </p>
  424. <h2 id="SetOutput">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=208:237#L7">SetOutput</a></h2>
  425. <pre>func SetOutput(out <a href="../../../io/index.html">io</a>.<a href="../../../io/index.html#Writer">Writer</a>)</pre>
  426. <p>
  427. SetOutput sets the standard logger output.
  428. </p>
  429. <h2 id="Warn">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2169:2199#L81">Warn</a></h2>
  430. <pre>func Warn(args ...interface{})</pre>
  431. <p>
  432. Warn logs a message at level Warn on the standard logger.
  433. </p>
  434. <h2 id="Warnf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3204:3250#L121">Warnf</a></h2>
  435. <pre>func Warnf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  436. <p>
  437. Warnf logs a message at level Warn on the standard logger.
  438. </p>
  439. <h2 id="Warning">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=2288:2321#L86">Warning</a></h2>
  440. <pre>func Warning(args ...interface{})</pre>
  441. <p>
  442. Warning logs a message at level Warn on the standard logger.
  443. </p>
  444. <h2 id="Warningf">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=3349:3398#L126">Warningf</a></h2>
  445. <pre>func Warningf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  446. <p>
  447. Warningf logs a message at level Warn on the standard logger.
  448. </p>
  449. <h2 id="Warningln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4434:4469#L166">Warningln</a></h2>
  450. <pre>func Warningln(args ...interface{})</pre>
  451. <p>
  452. Warningln logs a message at level Warn on the standard logger.
  453. </p>
  454. <h2 id="Warnln">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=4309:4341#L161">Warnln</a></h2>
  455. <pre>func Warnln(args ...interface{})</pre>
  456. <p>
  457. Warnln logs a message at level Warn on the standard logger.
  458. </p>
  459. <h2 id="Entry">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=446:777#L8">Entry</a></h2>
  460. <pre>type Entry struct {
  461. Logger *<a href="index.html#Logger">Logger</a>
  462. <span class="comment">// Contains all the fields set by the user.</span>
  463. Data <a href="index.html#Fields">Fields</a>
  464. <span class="comment">// Time at which the log entry was created</span>
  465. Time <a href="../../../time/index.html">time</a>.<a href="../../../time/index.html#Time">Time</a>
  466. <span class="comment">// Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic</span>
  467. Level <a href="index.html#Level">Level</a>
  468. <span class="comment">// Message passed to Debug, Info, Warn, Error, Fatal or Panic</span>
  469. Message <a href="../../../builtin/index.html#string">string</a>
  470. }</pre>
  471. <p>
  472. An entry is the final or intermediate Logrus logging entry. It contains all
  473. the fields passed with WithField{,s}. It&#39;s finally logged when Debug, Info,
  474. Warn, Error, Fatal or Panic is called on it. These objects can be reused and
  475. passed around as much as you wish to avoid field duplication.
  476. </p>
  477. <h3 id="NewEntry">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=779:815#L24">NewEntry</a></h3>
  478. <pre>func NewEntry(logger *<a href="index.html#Logger">Logger</a>) *<a href="index.html#Entry">Entry</a></pre>
  479. <h3 id="WithError">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=985:1017#L42">WithError</a></h3>
  480. <pre>func WithError(err <a href="../../../builtin/index.html#error">error</a>) *<a href="index.html#Entry">Entry</a></pre>
  481. <p>
  482. WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
  483. </p>
  484. <h3 id="WithField">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=1304:1356#L51">WithField</a></h3>
  485. <pre>func WithField(key <a href="../../../builtin/index.html#string">string</a>, value interface{}) *<a href="index.html#Entry">Entry</a></pre>
  486. <p>
  487. WithField creates an entry from the standard logger and adds a field to
  488. it. If you want multiple fields, use `WithFields`.
  489. </p>
  490. <p>
  491. Note that it doesn&#39;t log until you call Debug, Print, Info, Warn, Fatal
  492. or Panic on the Entry it returns.
  493. </p>
  494. <h3 id="WithFields">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=1679:1716#L61">WithFields</a></h3>
  495. <pre>func WithFields(fields <a href="index.html#Fields">Fields</a>) *<a href="index.html#Entry">Entry</a></pre>
  496. <p>
  497. WithFields creates an entry from the standard logger and adds multiple
  498. fields to it. This is simply a helper for `WithField`, invoking it
  499. once for each field.
  500. </p>
  501. <p>
  502. Note that it doesn&#39;t log until you call Debug, Print, Info, Warn, Fatal
  503. or Panic on the Entry it returns.
  504. </p>
  505. <h3 id="Entry.Debug">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3009:3055#L107">Debug</a></h3>
  506. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Debug(args ...interface{})</pre>
  507. <h3 id="Entry.Debugf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4056:4118#L155">Debugf</a></h3>
  508. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Debugf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  509. <h3 id="Entry.Debugln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5216:5264#L202">Debugln</a></h3>
  510. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Debugln(args ...interface{})</pre>
  511. <h3 id="Entry.Error">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3568:3614#L133">Error</a></h3>
  512. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Error(args ...interface{})</pre>
  513. <h3 id="Entry.Errorf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4710:4772#L181">Errorf</a></h3>
  514. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Errorf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  515. <h3 id="Entry.Errorln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5774:5822#L228">Errorln</a></h3>
  516. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Errorln(args ...interface{})</pre>
  517. <h3 id="Entry.Fatal">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3707:3753#L139">Fatal</a></h3>
  518. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Fatal(args ...interface{})</pre>
  519. <h3 id="Entry.Fatalf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4864:4926#L187">Fatalf</a></h3>
  520. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Fatalf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  521. <h3 id="Entry.Fatalln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5910:5958#L234">Fatalln</a></h3>
  522. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Fatalln(args ...interface{})</pre>
  523. <h3 id="Entry.Info">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3221:3266#L117">Info</a></h3>
  524. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Info(args ...interface{})</pre>
  525. <h3 id="Entry.Infof">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4210:4271#L161">Infof</a></h3>
  526. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Infof(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  527. <h3 id="Entry.Infoln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5352:5399#L208">Infoln</a></h3>
  528. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Infoln(args ...interface{})</pre>
  529. <h3 id="Entry.Panic">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3855:3901#L146">Panic</a></h3>
  530. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Panic(args ...interface{})</pre>
  531. <h3 id="Entry.Panicf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5027:5089#L194">Panicf</a></h3>
  532. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Panicf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  533. <h3 id="Entry.Panicln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=6055:6103#L241">Panicln</a></h3>
  534. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Panicln(args ...interface{})</pre>
  535. <h3 id="Entry.Print">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3148:3194#L113">Print</a></h3>
  536. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Print(args ...interface{})</pre>
  537. <h3 id="Entry.Printf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4361:4423#L167">Printf</a></h3>
  538. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Printf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  539. <h3 id="Entry.Println">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5485:5533#L214">Println</a></h3>
  540. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Println(args ...interface{})</pre>
  541. <h3 id="Entry.Reader">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=1008:1059#L33">Reader</a></h3>
  542. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Reader() (*<a href="../../../bytes/index.html">bytes</a>.<a href="../../../bytes/index.html#Buffer">Buffer</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  543. <p>
  544. Returns a reader for the entry, which is a proxy to the formatter.
  545. </p>
  546. <h3 id="Entry.String">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=1249:1293#L40">String</a></h3>
  547. <pre>func (entry *<a href="index.html#Entry">Entry</a>) String() (<a href="../../../builtin/index.html#string">string</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  548. <p>
  549. Returns the string representation from the reader and ultimately the
  550. formatter.
  551. </p>
  552. <h3 id="Entry.Warn">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3357:3402#L123">Warn</a></h3>
  553. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warn(args ...interface{})</pre>
  554. <h3 id="Entry.Warnf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4459:4520#L171">Warnf</a></h3>
  555. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warnf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  556. <h3 id="Entry.Warning">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=3493:3541#L129">Warning</a></h3>
  557. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warning(args ...interface{})</pre>
  558. <h3 id="Entry.Warningf">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=4610:4674#L177">Warningf</a></h3>
  559. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warningf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  560. <h3 id="Entry.Warningln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5695:5745#L224">Warningln</a></h3>
  561. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warningln(args ...interface{})</pre>
  562. <h3 id="Entry.Warnln">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=5562:5609#L218">Warnln</a></h3>
  563. <pre>func (entry *<a href="index.html#Entry">Entry</a>) Warnln(args ...interface{})</pre>
  564. <h3 id="Entry.WithError">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=1479:1526#L50">WithError</a></h3>
  565. <pre>func (entry *<a href="index.html#Entry">Entry</a>) WithError(err <a href="../../../builtin/index.html#error">error</a>) *<a href="index.html#Entry">Entry</a></pre>
  566. <p>
  567. Add an error as single field (using the key defined in ErrorKey) to the Entry.
  568. </p>
  569. <h3 id="Entry.WithField">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=1607:1674#L55">WithField</a></h3>
  570. <pre>func (entry *<a href="index.html#Entry">Entry</a>) WithField(key <a href="../../../builtin/index.html#string">string</a>, value interface{}) *<a href="index.html#Entry">Entry</a></pre>
  571. <p>
  572. Add a single field to the Entry.
  573. </p>
  574. <h3 id="Entry.WithFields">func (*Entry) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/entry.go?s=1762:1814#L60">WithFields</a></h3>
  575. <pre>func (entry *<a href="index.html#Entry">Entry</a>) WithFields(fields <a href="index.html#Fields">Fields</a>) *<a href="index.html#Entry">Entry</a></pre>
  576. <p>
  577. Add a map of fields to the Entry.
  578. </p>
  579. <h2 id="FieldLogger">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=2704:3665#L102">FieldLogger</a></h2>
  580. <pre>type FieldLogger interface {
  581. WithField(key <a href="../../../builtin/index.html#string">string</a>, value interface{}) *<a href="index.html#Entry">Entry</a>
  582. WithFields(fields <a href="index.html#Fields">Fields</a>) *<a href="index.html#Entry">Entry</a>
  583. WithError(err <a href="../../../builtin/index.html#error">error</a>) *<a href="index.html#Entry">Entry</a>
  584. Debugf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  585. Infof(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  586. Printf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  587. Warnf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  588. Warningf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  589. Errorf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  590. Fatalf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  591. Panicf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})
  592. Debug(args ...interface{})
  593. Info(args ...interface{})
  594. Print(args ...interface{})
  595. Warn(args ...interface{})
  596. Warning(args ...interface{})
  597. Error(args ...interface{})
  598. Fatal(args ...interface{})
  599. Panic(args ...interface{})
  600. Debugln(args ...interface{})
  601. Infoln(args ...interface{})
  602. Println(args ...interface{})
  603. Warnln(args ...interface{})
  604. Warningln(args ...interface{})
  605. Errorln(args ...interface{})
  606. Fatalln(args ...interface{})
  607. Panicln(args ...interface{})
  608. }</pre>
  609. <p>
  610. The FieldLogger interface generalizes the Entry and Logger types
  611. </p>
  612. <h2 id="Fields">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=99:133#L1">Fields</a></h2>
  613. <pre>type Fields map[<a href="../../../builtin/index.html#string">string</a>]interface{}</pre>
  614. <p>
  615. Fields type, used to pass to `WithFields`.
  616. </p>
  617. <h2 id="Formatter">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/formatter.go?s=586:646#L7">Formatter</a></h2>
  618. <pre>type Formatter interface {
  619. Format(*<a href="index.html#Entry">Entry</a>) ([]<a href="../../../builtin/index.html#byte">byte</a>, <a href="../../../builtin/index.html#error">error</a>)
  620. }</pre>
  621. <p>
  622. The Formatter interface is used to implement a custom Formatter. It takes an
  623. `Entry`. It exposes all the fields, including the default ones:
  624. </p>
  625. <p>
  626. * `entry.Data[&#34;msg&#34;]`. The message passed from Info, Warn, Error ..
  627. * `entry.Data[&#34;time&#34;]`. The timestamp.
  628. * `entry.Data[&#34;level&#34;]. The level the entry was logged at.
  629. </p>
  630. <p>
  631. Any additional fields added with `WithField` or `WithFields` are also in
  632. `entry.Data`. Format is expected to return an array of bytes which are then
  633. logged to `logger.Out`.
  634. </p>
  635. <h2 id="Hook">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/hooks.go?s=383:444#L1">Hook</a></h2>
  636. <pre>type Hook interface {
  637. Levels() []<a href="index.html#Level">Level</a>
  638. Fire(*<a href="index.html#Entry">Entry</a>) <a href="../../../builtin/index.html#error">error</a>
  639. }</pre>
  640. <p>
  641. A hook to be fired when logging on the logging levels returned from
  642. `Levels()` on your implementation of the interface. Note that this is not
  643. fired in a goroutine or a channel with workers, you should handle such
  644. functionality yourself if your call is non-blocking and you don&#39;t wish for
  645. the logging calls for levels returned from `Levels()` to block.
  646. </p>
  647. <h2 id="JSONFormatter">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/json_formatter.go?s=52:173#L1">JSONFormatter</a></h2>
  648. <pre>type JSONFormatter struct {
  649. <span class="comment">// TimestampFormat sets the format used for marshaling timestamps.</span>
  650. TimestampFormat <a href="../../../builtin/index.html#string">string</a>
  651. }</pre>
  652. <h3 id="JSONFormatter.Format">func (*JSONFormatter) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/json_formatter.go?s=175:235#L3">Format</a></h3>
  653. <pre>func (f *<a href="index.html#JSONFormatter">JSONFormatter</a>) Format(entry *<a href="index.html#Entry">Entry</a>) ([]<a href="../../../builtin/index.html#byte">byte</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  654. <h2 id="Level">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=149:165#L3">Level</a></h2>
  655. <pre>type Level <a href="../../../builtin/index.html#uint8">uint8</a></pre>
  656. <p>
  657. Level type
  658. </p>
  659. <pre>const (
  660. <span class="comment">// PanicLevel level, highest level of severity. Logs and then calls panic with the</span>
  661. <span class="comment">// message passed to Debug, Info, ...</span>
  662. <span id="PanicLevel">PanicLevel</span> <a href="index.html#Level">Level</a> = <a href="../../../builtin/index.html#iota">iota</a>
  663. <span class="comment">// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the</span>
  664. <span class="comment">// logging level is set to Panic.</span>
  665. <span id="FatalLevel">FatalLevel</span>
  666. <span class="comment">// ErrorLevel level. Logs. Used for errors that should definitely be noted.</span>
  667. <span class="comment">// Commonly used for hooks to send errors to an error tracking service.</span>
  668. <span id="ErrorLevel">ErrorLevel</span>
  669. <span class="comment">// WarnLevel level. Non-critical entries that deserve eyes.</span>
  670. <span id="WarnLevel">WarnLevel</span>
  671. <span class="comment">// InfoLevel level. General operational entries about what&#39;s going on inside the</span>
  672. <span class="comment">// application.</span>
  673. <span id="InfoLevel">InfoLevel</span>
  674. <span class="comment">// DebugLevel level. Usually only enabled when debugging. Very verbose logging.</span>
  675. <span id="DebugLevel">DebugLevel</span>
  676. )</pre>
  677. <p>
  678. These are the different logging levels. You can set the logging level to log
  679. on your instance of logger, obtained with `logrus.New()`.
  680. </p>
  681. <h3 id="GetLevel">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=637:658#L28">GetLevel</a></h3>
  682. <pre>func GetLevel() <a href="index.html#Level">Level</a></pre>
  683. <p>
  684. GetLevel returns the standard logger level.
  685. </p>
  686. <h3 id="ParseLevel">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=599:641#L26">ParseLevel</a></h3>
  687. <pre>func ParseLevel(lvl <a href="../../../builtin/index.html#string">string</a>) (<a href="index.html#Level">Level</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  688. <p>
  689. ParseLevel takes a string level and returns the Logrus log level constant.
  690. </p>
  691. <h3 id="Level.String">func (Level) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=234:268#L6">String</a></h3>
  692. <pre>func (level <a href="index.html#Level">Level</a>) String() <a href="../../../builtin/index.html#string">string</a></pre>
  693. <p>
  694. Convert the Level to a string. E.g. PanicLevel becomes &#34;panic&#34;.
  695. </p>
  696. <h2 id="LevelHooks">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/hooks.go?s=507:539#L4">LevelHooks</a></h2>
  697. <pre>type LevelHooks map[<a href="index.html#Level">Level</a>][]<a href="index.html#Hook">Hook</a></pre>
  698. <p>
  699. Internal type for storing the hooks on a logger instance.
  700. </p>
  701. <h3 id="LevelHooks.Add">func (LevelHooks) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/hooks.go?s=681:719#L8">Add</a></h3>
  702. <pre>func (hooks <a href="index.html#LevelHooks">LevelHooks</a>) Add(hook <a href="index.html#Hook">Hook</a>)</pre>
  703. <p>
  704. Add a hook to an instance of logger. This is called with
  705. `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
  706. </p>
  707. <h3 id="LevelHooks.Fire">func (LevelHooks) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/hooks.go?s=921:982#L16">Fire</a></h3>
  708. <pre>func (hooks <a href="index.html#LevelHooks">LevelHooks</a>) Fire(level <a href="index.html#Level">Level</a>, entry *<a href="index.html#Entry">Entry</a>) <a href="../../../builtin/index.html#error">error</a></pre>
  709. <p>
  710. Fire all the hooks for the passed level. Used by `entry.log` to fire
  711. appropriate hooks for a log entry.
  712. </p>
  713. <h2 id="Logger">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=48:1228#L1">Logger</a></h2>
  714. <pre>type Logger struct {
  715. <span class="comment">// The logs are `io.Copy`&#39;d to this in a mutex. It&#39;s common to set this to a</span>
  716. <span class="comment">// file, or leave it default which is `os.Stderr`. You can also set this to</span>
  717. <span class="comment">// something more adventorous, such as logging to Kafka.</span>
  718. Out <a href="../../../io/index.html">io</a>.<a href="../../../io/index.html#Writer">Writer</a>
  719. <span class="comment">// Hooks for the logger instance. These allow firing events based on logging</span>
  720. <span class="comment">// levels and log entries. For example, to send errors to an error tracking</span>
  721. <span class="comment">// service, log to StatsD or dump the core on fatal errors.</span>
  722. Hooks <a href="index.html#LevelHooks">LevelHooks</a>
  723. <span class="comment">// All log entries pass through the formatter before logged to Out. The</span>
  724. <span class="comment">// included formatters are `TextFormatter` and `JSONFormatter` for which</span>
  725. <span class="comment">// TextFormatter is the default. In development (when a TTY is attached) it</span>
  726. <span class="comment">// logs with colors, but to a file it wouldn&#39;t. You can easily implement your</span>
  727. <span class="comment">// own that implements the `Formatter` interface, see the `README` or included</span>
  728. <span class="comment">// formatters for examples.</span>
  729. Formatter <a href="index.html#Formatter">Formatter</a>
  730. <span class="comment">// The logging level the logger should log at. This is typically (and defaults</span>
  731. <span class="comment">// to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be</span>
  732. <span class="comment">// logged. `logrus.Debug` is useful in</span>
  733. Level <a href="index.html#Level">Level</a>
  734. <span class="comment">// contains filtered or unexported fields</span>
  735. }</pre>
  736. <h3 id="New">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=1647:1665#L35">New</a></h3>
  737. <pre>func New() *<a href="index.html#Logger">Logger</a></pre>
  738. <p>
  739. Creates a new logger. Configuration should be set by changing `Formatter`,
  740. `Out` and `Hooks` directly on the default logger instance. You can also just
  741. instantiate your own:
  742. </p>
  743. <pre>var log = &amp;Logger{
  744. Out: os.Stderr,
  745. Formatter: new(JSONFormatter),
  746. Hooks: make(LevelHooks),
  747. Level: logrus.DebugLevel,
  748. }
  749. </pre>
  750. <p>
  751. It&#39;s recommended to make this a global instance called `log`.
  752. </p>
  753. <h3 id="StandardLogger">func <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/exported.go?s=115:144#L2">StandardLogger</a></h3>
  754. <pre>func StandardLogger() *<a href="index.html#Logger">Logger</a></pre>
  755. <h3 id="Logger.Debug">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3687:3735#L110">Debug</a></h3>
  756. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Debug(args ...interface{})</pre>
  757. <h3 id="Logger.Debugf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2529:2593#L63">Debugf</a></h3>
  758. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Debugf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  759. <h3 id="Logger.Debugln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4644:4694#L157">Debugln</a></h3>
  760. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Debugln(args ...interface{})</pre>
  761. <h3 id="Logger.Error">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4263:4311#L138">Error</a></h3>
  762. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Error(args ...interface{})</pre>
  763. <h3 id="Logger.Errorf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3231:3295#L91">Errorf</a></h3>
  764. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Errorf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  765. <h3 id="Logger.Errorln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=5241:5291#L185">Errorln</a></h3>
  766. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Errorln(args ...interface{})</pre>
  767. <h3 id="Logger.Fatal">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4387:4435#L144">Fatal</a></h3>
  768. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Fatal(args ...interface{})</pre>
  769. <h3 id="Logger.Fatalf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3380:3444#L97">Fatalf</a></h3>
  770. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Fatalf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  771. <h3 id="Logger.Fatalln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=5369:5419#L191">Fatalln</a></h3>
  772. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Fatalln(args ...interface{})</pre>
  773. <h3 id="Logger.Info">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3811:3858#L116">Info</a></h3>
  774. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Info(args ...interface{})</pre>
  775. <h3 id="Logger.Infof">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2678:2741#L69">Infof</a></h3>
  776. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Infof(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  777. <h3 id="Logger.Infoln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4772:4821#L163">Infoln</a></h3>
  778. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Infoln(args ...interface{})</pre>
  779. <h3 id="Logger.Panic">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4520:4568#L151">Panic</a></h3>
  780. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Panic(args ...interface{})</pre>
  781. <h3 id="Logger.Panicf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3538:3602#L104">Panicf</a></h3>
  782. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Panicf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  783. <h3 id="Logger.Panicln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=5506:5556#L198">Panicln</a></h3>
  784. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Panicln(args ...interface{})</pre>
  785. <h3 id="Logger.Print">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3932:3980#L122">Print</a></h3>
  786. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Print(args ...interface{})</pre>
  787. <h3 id="Logger.Printf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2824:2888#L75">Printf</a></h3>
  788. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Printf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  789. <h3 id="Logger.Println">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4897:4947#L169">Println</a></h3>
  790. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Println(args ...interface{})</pre>
  791. <h3 id="Logger.Warn">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4018:4065#L126">Warn</a></h3>
  792. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warn(args ...interface{})</pre>
  793. <h3 id="Logger.Warnf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2936:2999#L79">Warnf</a></h3>
  794. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warnf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  795. <h3 id="Logger.Warning">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4139:4189#L132">Warning</a></h3>
  796. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warning(args ...interface{})</pre>
  797. <h3 id="Logger.Warningf">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=3082:3148#L85">Warningf</a></h3>
  798. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warningf(format <a href="../../../builtin/index.html#string">string</a>, args ...interface{})</pre>
  799. <h3 id="Logger.Warningln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=5113:5165#L179">Warningln</a></h3>
  800. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warningln(args ...interface{})</pre>
  801. <h3 id="Logger.Warnln">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=4988:5037#L173">Warnln</a></h3>
  802. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Warnln(args ...interface{})</pre>
  803. <h3 id="Logger.WithError">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2434:2483#L59">WithError</a></h3>
  804. <pre>func (logger *<a href="index.html#Logger">Logger</a>) WithError(err <a href="../../../builtin/index.html#error">error</a>) *<a href="index.html#Entry">Entry</a></pre>
  805. <p>
  806. Add an error as single field to the log entry. All it does is call
  807. `WithError` for the given `error`.
  808. </p>
  809. <h3 id="Logger.WithField">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2001:2070#L47">WithField</a></h3>
  810. <pre>func (logger *<a href="index.html#Logger">Logger</a>) WithField(key <a href="../../../builtin/index.html#string">string</a>, value interface{}) *<a href="index.html#Entry">Entry</a></pre>
  811. <p>
  812. Adds a field to the log entry, note that it doesn&#39;t log until you call
  813. Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
  814. If you want multiple fields, use `WithFields`.
  815. </p>
  816. <h3 id="Logger.WithFields">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logger.go?s=2221:2275#L53">WithFields</a></h3>
  817. <pre>func (logger *<a href="index.html#Logger">Logger</a>) WithFields(fields <a href="index.html#Fields">Fields</a>) *<a href="index.html#Entry">Entry</a></pre>
  818. <p>
  819. Adds a struct of fields to the log entry. All it does is call `WithField` for
  820. each `Field`.
  821. </p>
  822. <h3 id="Logger.Writer">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/writer.go?s=54:99#L1">Writer</a></h3>
  823. <pre>func (logger *<a href="index.html#Logger">Logger</a>) Writer() *<a href="../../../io/index.html">io</a>.<a href="../../../io/index.html#PipeWriter">PipeWriter</a></pre>
  824. <h3 id="Logger.WriterLevel">func (*Logger) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/writer.go?s=143:204#L3">WriterLevel</a></h3>
  825. <pre>func (logger *<a href="index.html#Logger">Logger</a>) WriterLevel(level <a href="index.html#Level">Level</a>) *<a href="../../../io/index.html">io</a>.<a href="../../../io/index.html#PipeWriter">PipeWriter</a></pre>
  826. <h2 id="StdLogger">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/logrus.go?s=2364:2634#L87">StdLogger</a></h2>
  827. <pre>type StdLogger interface {
  828. Print(...interface{})
  829. Printf(<a href="../../../builtin/index.html#string">string</a>, ...interface{})
  830. Println(...interface{})
  831. Fatal(...interface{})
  832. Fatalf(<a href="../../../builtin/index.html#string">string</a>, ...interface{})
  833. Fatalln(...interface{})
  834. Panic(...interface{})
  835. Panicf(<a href="../../../builtin/index.html#string">string</a>, ...interface{})
  836. Panicln(...interface{})
  837. }</pre>
  838. <p>
  839. StdLogger is what your logrus-enabled library should take, that way
  840. it&#39;ll accept a stdlib logger and a logrus logger. There&#39;s no standard
  841. interface, this is the closest we get, unfortunately.
  842. </p>
  843. <h2 id="Termios">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/terminal_linux.go?s=261:289#L2">Termios</a></h2>
  844. <pre>type Termios <a href="../../../syscall/index.html">syscall</a>.<a href="../../../syscall/index.html#Termios">Termios</a></pre>
  845. <h2 id="TextFormatter">type <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/text_formatter.go?s=378:1127#L25">TextFormatter</a></h2>
  846. <pre>type TextFormatter struct {
  847. <span class="comment">// Set to true to bypass checking for a TTY before outputting colors.</span>
  848. ForceColors <a href="../../../builtin/index.html#bool">bool</a>
  849. <span class="comment">// Force disabling colors.</span>
  850. DisableColors <a href="../../../builtin/index.html#bool">bool</a>
  851. <span class="comment">// Disable timestamp logging. useful when output is redirected to logging</span>
  852. <span class="comment">// system that already adds timestamps.</span>
  853. DisableTimestamp <a href="../../../builtin/index.html#bool">bool</a>
  854. <span class="comment">// Enable logging the full timestamp when a TTY is attached instead of just</span>
  855. <span class="comment">// the time passed since beginning of execution.</span>
  856. FullTimestamp <a href="../../../builtin/index.html#bool">bool</a>
  857. <span class="comment">// TimestampFormat to use for display when a full timestamp is printed</span>
  858. TimestampFormat <a href="../../../builtin/index.html#string">string</a>
  859. <span class="comment">// The fields are sorted by default for a consistent output. For applications</span>
  860. <span class="comment">// that log extremely frequently and don&#39;t use the JSON formatter this may not</span>
  861. <span class="comment">// be desired.</span>
  862. DisableSorting <a href="../../../builtin/index.html#bool">bool</a>
  863. }</pre>
  864. <h3 id="TextFormatter.Format">func (*TextFormatter) <a href="http://localhost:6060/src/github.com/Sirupsen/logrus/text_formatter.go?s=1129:1189#L49">Format</a></h3>
  865. <pre>func (f *<a href="index.html#TextFormatter">TextFormatter</a>) Format(entry *<a href="index.html#Entry">Entry</a>) ([]<a href="../../../builtin/index.html#byte">byte</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  866. <h2 id="pkg-subdirectories">Subdirectories</h2>
  867. <div class="pkg-dir">
  868. <table>
  869. <tr>
  870. <th class="pkg-name">Name</th>
  871. <th class="pkg-synopsis">Synopsis</th>
  872. </tr>
  873. <tr>
  874. <td colspan="2"><a href="../index.html">..</a></td>
  875. </tr>
  876. <tr>
  877. <td class="pkg-name" style="padding-left: 0px;">
  878. <a href="examples/index.html">examples</a>
  879. </td>
  880. <td class="pkg-synopsis">
  881. </td>
  882. </tr>
  883. <tr>
  884. <td class="pkg-name" style="padding-left: 20px;">
  885. <a href="examples/basic/index.html">basic</a>
  886. </td>
  887. <td class="pkg-synopsis">
  888. </td>
  889. </tr>
  890. <tr>
  891. <td class="pkg-name" style="padding-left: 20px;">
  892. <a href="examples/hook/index.html">hook</a>
  893. </td>
  894. <td class="pkg-synopsis">
  895. </td>
  896. </tr>
  897. <tr>
  898. <td class="pkg-name" style="padding-left: 0px;">
  899. <a href="hooks/index.html">hooks</a>
  900. </td>
  901. <td class="pkg-synopsis">
  902. </td>
  903. </tr>
  904. <tr>
  905. <td class="pkg-name" style="padding-left: 20px;">
  906. <a href="hooks/syslog/index.html">syslog</a>
  907. </td>
  908. <td class="pkg-synopsis">
  909. </td>
  910. </tr>
  911. <tr>
  912. <td class="pkg-name" style="padding-left: 20px;">
  913. <a href="hooks/test/index.html">test</a>
  914. </td>
  915. <td class="pkg-synopsis">
  916. </td>
  917. </tr>
  918. </table>
  919. </div>
  920. <div id="footer">
  921. Build version go1.6.<br>
  922. Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
  923. the content of this page is licensed under the
  924. Creative Commons Attribution 3.0 License,
  925. and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
  926. <a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
  927. <a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
  928. </div>
  929. </div><!-- .container -->
  930. </div><!-- #page -->
  931. <!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
  932. <script type="text/javascript" src="../../../../lib/godoc/jquery.js"></script>
  933. <script type="text/javascript" src="../../../../lib/godoc/jquery.treeview.js"></script>
  934. <script type="text/javascript" src="../../../../lib/godoc/jquery.treeview.edit.js"></script>
  935. <script type="text/javascript" src="../../../../lib/godoc/godocs.js"></script>
  936. </body>
  937. </html>