This file is indexed.

/usr/share/doc/racket/reference/logging.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>15.5&nbsp;Logging</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewselflink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">15.1&nbsp;</td><td><a href="pathutils.html" class="tocviewlink" data-pltdoc="x">Paths</a></td></tr><tr><td align="right">15.2&nbsp;</td><td><a href="Filesystem.html" class="tocviewlink" data-pltdoc="x">Filesystem</a></td></tr><tr><td align="right">15.3&nbsp;</td><td><a href="networking.html" class="tocviewlink" data-pltdoc="x">Networking</a></td></tr><tr><td align="right">15.4&nbsp;</td><td><a href="subprocess.html" class="tocviewlink" data-pltdoc="x">Processes</a></td></tr><tr><td align="right">15.5&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Logging</a></td></tr><tr><td align="right">15.6&nbsp;</td><td><a href="time.html" class="tocviewlink" data-pltdoc="x">Time</a></td></tr><tr><td align="right">15.7&nbsp;</td><td><a href="envvars.html" class="tocviewlink" data-pltdoc="x">Environment Variables</a></td></tr><tr><td align="right">15.8&nbsp;</td><td><a href="runtime.html" class="tocviewlink" data-pltdoc="x">Environment and Runtime Information</a></td></tr><tr><td align="right">15.9&nbsp;</td><td><a href="Command-Line_Parsing.html" class="tocviewlink" data-pltdoc="x">Command-<wbr></wbr>Line Parsing</a></td></tr><tr><td align="right">15.10&nbsp;</td><td><a href="os-lib.html" class="tocviewlink" data-pltdoc="x">Additional Operating System Functions</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_2&quot;);">&#9658;</a></td><td>15.5&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Logging</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">15.5.1&nbsp;</td><td><a href="#%28part._.Creating_.Loggers%29" class="tocviewlink" data-pltdoc="x">Creating Loggers</a></td></tr><tr><td align="right">15.5.2&nbsp;</td><td><a href="#%28part._.Logging_.Events%29" class="tocviewlink" data-pltdoc="x">Logging Events</a></td></tr><tr><td align="right">15.5.3&nbsp;</td><td><a href="#%28part._receiving-logged-events%29" class="tocviewlink" data-pltdoc="x">Receiving Logged Events</a></td></tr><tr><td align="right">15.5.4&nbsp;</td><td><a href="#%28part._.Additional_.Logging_.Functions%29" class="tocviewlink" data-pltdoc="x">Additional Logging Functions</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">15.5.1<tt>&nbsp;</tt></span><a href="#%28part._.Creating_.Loggers%29" class="tocsubseclink" data-pltdoc="x">Creating Loggers</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">logger?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-logger%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>logger</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._logger-name%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">logger-<wbr></wbr>name</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>logger</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>logger</span></span></a></td></tr><tr><td><span class="tocsublinknumber">15.5.2<tt>&nbsp;</tt></span><a href="#%28part._.Logging_.Events%29" class="tocsubseclink" data-pltdoc="x">Logging Events</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-message%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>message</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>level?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>max-<wbr></wbr>level</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-all-levels%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>all-<wbr></wbr>levels</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-level-evt%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>level-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-fatal%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">log-<wbr></wbr>fatal</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">log-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">log-<wbr></wbr>warning</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-info%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">log-<wbr></wbr>info</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-debug%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">log-<wbr></wbr>debug</span></span></a></td></tr><tr><td><span class="tocsublinknumber">15.5.3<tt>&nbsp;</tt></span><a href="#%28part._receiving-logged-events%29" class="tocsubseclink" data-pltdoc="x">Receiving Logged Events</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._log-receiver~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>receiver?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>log-<wbr></wbr>receiver</span></span></a></td></tr><tr><td><span class="tocsublinknumber">15.5.4<tt>&nbsp;</tt></span><a href="#%28part._.Additional_.Logging_.Functions%29" class="tocsubseclink" data-pltdoc="x">Additional Logging Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">log-<wbr></wbr>level/<span class="mywbr"> &nbsp;</span>c</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-intercepted-logging%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">with-<wbr></wbr>intercepted-<wbr></wbr>logging</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-logging-to-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">with-<wbr></wbr>logging-<wbr></wbr>to-<wbr></wbr>port</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="subprocess.html" title="backward to &quot;15.4 Processes&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="os.html" title="up to &quot;15 Operating System&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="time.html" title="forward to &quot;15.6 Time&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;logging&quot;">15.5<tt>&nbsp;</tt><a name="(part._logging)"></a>Logging</h4><p>A <a name="(tech._logger)"></a><span style="font-style: italic">logger</span> accepts events that contain information to be
logged for interested parties. A <a name="(tech._log._receiver)"></a><span style="font-style: italic">log receiver</span> represents an
interested party that receives logged events asynchronously. Each
event has a topic and level of detail, and a <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> subscribes to
logging events at a certain level of detail (and higher) for a specific topic or for all topics. The
levels, in increasing order of detail, are <span class="RktVal">'</span><span class="RktVal">fatal</span>,
<span class="RktVal">'</span><span class="RktVal">error</span>, <span class="RktVal">'</span><span class="RktVal">warning</span>, <span class="RktVal">'</span><span class="RktVal">info</span>, and
<span class="RktVal">'</span><span class="RktVal">debug</span>.</p><p>To help organize logged events, a <a href="#%28tech._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">logger</span></a> can have a default topic and/or
a parent logger. Every event reported to a logger is also propagated to
its parent (if any), while the event message is prefixed with the logger&rsquo;s topic (if
any) if the message doesn&rsquo;t already have a topic. Furthermore, events that are propagated
from a logger to its parent can be filtered by level and topic.</p><p>On start-up, Racket creates an initial logger that is used to
record events from the core run-time system. For example, an
<span class="RktVal">'</span><span class="RktVal">debug</span> event is reported for each garbage collection (see
<a href="eval-model.html#%28part._gc-model%29" data-pltdoc="x">Garbage Collection</a>). For this initial logger, two log receivers are
also created: one that writes events to the process&rsquo;s original error
output port, and one that writes events to the system log. The level
of written events in each case is system-specific, and the default can
be changed through command-line flags (see <a href="running-sa.html#%28part._mz-cmdline%29" data-pltdoc="x">Command Line</a>) or
through environment variables:</p><ul><li><p>If the <a name="(idx._(gentag._349._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">PLTSTDERR</span> environment variable is
defined and is not overridden by a command-line flag, it
determines the level of the <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> that propagates
events to the original error port.</p><p>The environment variable&rsquo;s value can be a <span class="sroman">&#8249;<span style="font-style: italic">level</span>&#8250;</span>:
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">none</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">fatal</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">error</span><span class="hspace"></span></span>,
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">warning</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">info</span><span class="hspace"></span></span>, or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">debug</span><span class="hspace"></span></span>; all
events the corresponding level of higher are printed. After an
initial <span class="sroman">&#8249;<span style="font-style: italic">level</span>&#8250;</span>, the value can contain
whitespace-separated specifications of the form
<span class="sroman">&#8249;<span style="font-style: italic">level</span>&#8250;</span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">@</span><span class="hspace"></span></span><span class="sroman">&#8249;<span style="font-style: italic">topic</span>&#8250;</span>, which prints
events whose topics match <span class="sroman">&#8249;<span style="font-style: italic">topic</span>&#8250;</span> only at the given
<span class="sroman">&#8249;<span style="font-style: italic">level</span>&#8250;</span> or higher (where a <span class="sroman">&#8249;<span style="font-style: italic">topic</span>&#8250;</span> contains any
character other than whitespace or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">@</span><span class="hspace"></span></span>). Leading and
trailing whitespace is ignored. For example, the value
<span class="RktVal">"error debug@GC"</span> prints all events at the
<span class="RktVal">'</span><span class="RktVal">error</span> level and higher, but prints events for the
topic <span class="RktVal">'</span><span class="RktVal">GC</span> at the <span class="RktVal">'</span><span class="RktVal">debug</span> level and higher
(which includes all levels).</p><p>The default is <span class="RktVal">"error"</span>.</p></li><li><p>If the <a name="(idx._(gentag._350._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">PLTSYSLOG</span> environment variable is
defined and is not overridden by a command-line flag, it
determines the level of the <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> that propagates
events to the system log. The possible values are the
same as for <span class="stt">PLTSTDERR</span>.</p><p>The default is <span class="RktVal">"none"</span> for Unix or <span class="RktVal">"error"</span> for
Windows and Mac OS X.</p></li></ul><p>The <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValLink" data-pltdoc="x">current-logger</a></span> <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> determines the
<a name="(tech._current._logger)"></a><span style="font-style: italic">current logger</span> that is used by forms such as
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span>. On start-up, the initial value of this parameter
is the initial logger. The run-time system sometimes uses the current
logger to report events. For example, the bytecode compiler sometimes
reports <span class="RktVal">'</span><span class="RktVal">warning</span> events when it detects an expression that
would produce a run-time error if evaluated.</p><p class="SHistory">Changed in version 6.6.0.2 of package <span class="stt">base</span>: Prior to version 6.6.0.2, parsing
of <span class="stt">PLTSTDERR</span> and <span class="stt">PLTSYSLOG</span> was very strict.
Leading and trailing whitespace was forbidden, and anything other
than exactly one space character separating two specifications was
rejected.</p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Creating_Loggers&quot;">15.5.1<tt>&nbsp;</tt><a name="(part._.Creating_.Loggers)"></a>Creating Loggers</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._logger~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">logger?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <a href="#%28tech._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">logger</span></a>, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-logger))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-logger%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-logger</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">topic</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">parent</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">propagate-level</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">propagate-topic</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span>]</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">parent</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">propagate-level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">debug</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">propagate-topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new <a href="#%28tech._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">logger</span></a> with an optional topic and parent.</div></p><p>The optional <span class="RktVar">propagate-level</span> and <span class="RktVar">propagate-topic</span>
arguments constrain the events that are propagated from the new logger
to <span class="RktVar">parent</span> (when <span class="RktVar">parent</span> is not <span class="RktVal">#f</span>) in the
same way that events are described for a log receiver in
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="RktValLink" data-pltdoc="x">make-log-receiver</a></span>. By default, all events are propagated to
<span class="RktVar">parent</span>.</p><p class="SHistory">Changed in version 6.1.1.3 of package <span class="stt">base</span>: Removed an optional argument to
specify a notification callback,
and added <span class="RktVar">propagate-level</span> and
<span class="RktVar">propagate-topic</span> constraints for
events to propagate.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._logger-name))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger-name%29%29" class="RktValDef RktValLink" data-pltdoc="x">logger-name</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Reports <span class="RktVar">logger</span>&rsquo;s default topic, if any.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-logger))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-logger</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-logger</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines the <a href="#%28tech._current._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">current logger</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._define-logger))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-logger</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-fatal</span>,
<span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-error</span>,
<span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-warning</span>,
<span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-info</span>, and
<span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-debug</span> as forms
like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-fatal%29%29" class="RktStxLink" data-pltdoc="x">log-fatal</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxLink" data-pltdoc="x">log-error</a></span>,<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span>,
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-info%29%29" class="RktStxLink" data-pltdoc="x">log-info</a></span>, and <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-debug%29%29" class="RktStxLink" data-pltdoc="x">log-debug</a></span>. The <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxLink" data-pltdoc="x">define-logger</a></span>
form also defines <span class="RktVar">id</span><span class="RktSym">-logger</span>, which is a logger with
default topic <span class="RktVal">'</span><span class="RktVar">id</span> that is a child of <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValLink" data-pltdoc="x">current-logger</a></span><span class="RktPn">)</span>;
the <span class="RktKw">log-</span><span class="RktVar">id</span><span class="RktKw">-fatal</span>,
etc<span class="Sendabbrev">.</span> forms use this new logger. The new logger is
created when <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxLink" data-pltdoc="x">define-logger</a></span> is evaluated.</div></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Logging_Events&quot;">15.5.2<tt>&nbsp;</tt><a name="(part._.Logging_.Events)"></a>Logging Events</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-message))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-message%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-message</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">logger</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">level</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">topic</span>]</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">message</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">data</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">prefix-message?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger-name%29%29" class="RktValLink" data-pltdoc="x">logger-name</a></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">data</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">prefix-message?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Reports an event to <span class="RktVar">logger</span>, which in turn distributes the
information to any <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receivers</span></a> attached to <span class="RktVar">logger</span> or
its ancestors that are interested in events at <span class="RktVar">level</span> or
higher.</div></p><p><a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">Log receivers</span></a> can filter events based on <span class="RktVar">topic</span>.  In
addition, if <span class="RktVar">topic</span> and <span class="RktVar">prefix-message?</span> are not
<span class="RktVal">#f</span>, then <span class="RktVar">message</span> is prefixed with the topic followed
by <span class="RktVal">": "</span> before it is sent to receivers.</p><p class="SHistory">Changed in version 6.0.1.10 of package <span class="stt">base</span>: Added the <span class="RktVar">prefix-message?</span> argument.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-level~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-level?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>[<span class="RktVar">topic</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Reports whether any <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> attached to <span class="RktVar">logger</span> or
one of its ancestors is interested in <span class="RktVar">level</span> events (or
potentially lower) for <span class="RktVar">topic</span>. If <span class="RktVar">topic</span> is <span class="RktVal">#f</span>,
the result indicates whether a <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> is interested in
events at <span class="RktVar">level</span> for any topic.</div></p><p>Use this function to avoid work generating an
event for <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-message%29%29" class="RktValLink" data-pltdoc="x">log-message</a></span> if no receiver is interested in the
information; this shortcut is built into <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-fatal%29%29" class="RktStxLink" data-pltdoc="x">log-fatal</a></span>,
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxLink" data-pltdoc="x">log-error</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-info%29%29" class="RktStxLink" data-pltdoc="x">log-info</a></span>,
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-debug%29%29" class="RktStxLink" data-pltdoc="x">log-debug</a></span>, and forms bound by <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxLink" data-pltdoc="x">define-logger</a></span>,
however, so it should not be used with those forms.</p><p>The result of this function can change if a garbage collection
determines that a log receiver is no longer accessible (and therefore
that any event information it receives will never become accessible).</p><p class="SHistory">Changed in version 6.1.1.3 of package <span class="stt">base</span>: Added the <span class="RktVar">topic</span> argument.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-max-level))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-max-level</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>[<span class="RktVar">topic</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Similar to <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span>, but reports the maximum-detail level of logging for
which <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span> on <span class="RktVar">logger</span> and <span class="RktVar">topic</span> returns <span class="RktVal">#t</span>. The
result is <span class="RktVal">#f</span> if <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span> with <span class="RktVar">logger</span> and <span class="RktVar">topic</span>
currently returns <span class="RktVal">#f</span> for all levels.</div></p><p class="SHistory">Changed in version 6.1.1.3 of package <span class="stt">base</span>: Added the <span class="RktVar">topic</span> argument.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-all-levels))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-all-levels%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-all-levels</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._list%2Fc%29%29" class="RktValLink" data-pltdoc="x">list/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Summarizes the possible results of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="RktValLink" data-pltdoc="x">log-max-level</a></span> on all
possible <a href="reader.html#%28tech._interned%29" class="techoutside" data-pltdoc="x"><span class="techinside">interned</span></a> symbols. The result list contains a sequence
of symbols and <span class="RktVal">#f</span>, where the first, third, etc., list element
corresponds to a level, and the second, fourth, etc., list element
indicates a corresponding topic. The level is the result that
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="RktValLink" data-pltdoc="x">log-max-level</a></span> would produce for the topic, where the level for
the <span class="RktVal">#f</span> topic (which is always present in the result list)
indicates the result for any <a href="reader.html#%28tech._interned%29" class="techoutside" data-pltdoc="x"><span class="techinside">interned</span></a>-symbol topic that does not
appear in the list.</div></p><p>The result is suitable as a sequence of arguments to
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="RktValLink" data-pltdoc="x">make-log-receiver</a></span> (after a <a href="#%28tech._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">logger</span></a> argument) to create
a new receiver for events that currently have receivers in <span class="RktVar">logger</span>.</p><p class="SHistory">Added in version 6.1.1.4 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-level-evt))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-level-evt</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a> that is <a href="sync.html#%28tech._ready._for._synchronization%29" class="techoutside" data-pltdoc="x"><span class="techinside">ready for
synchronization</span></a> when the result of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span>,
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="RktValLink" data-pltdoc="x">log-max-level</a></span>, or <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-all-levels%29%29" class="RktValLink" data-pltdoc="x">log-all-levels</a></span> can be different
than before <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level-evt%29%29" class="RktValLink" data-pltdoc="x">log-level-evt</a></span> was called. The event&rsquo;s
<a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is the event itself.</div></p><p>The condition reported by the event is a conservative approximation:
the event can become <a href="sync.html#%28tech._ready._for._synchronization%29" class="techoutside" data-pltdoc="x"><span class="techinside">ready for synchronization</span></a> even if the
results of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-max-level%29%29" class="RktValLink" data-pltdoc="x">log-max-level</a></span>, and
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-all-levels%29%29" class="RktValLink" data-pltdoc="x">log-all-levels</a></span> are unchanged. Nevertheless, the expectation
is that events produced by <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level-evt%29%29" class="RktValLink" data-pltdoc="x">log-level-evt</a></span> become ready infrequently,
because they are triggered by the creation of a log receiver.</p><p class="SHistory">Added in version 6.1.1.4 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._log-fatal))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-fatal%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-fatal</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-fatal%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-fatal</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._log-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-error</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-error</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._log-warning))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-warning</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-warning</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._log-info))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-info%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-info</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-info%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-info</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._log-debug))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-debug%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-debug</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-debug%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">log-debug</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Log an event with the <a href="#%28tech._current._logger%29" class="techoutside" data-pltdoc="x"><span class="techinside">current logger</span></a>, evaluating
<span class="RktVar">string-expr</span> or <span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._format%29%29" class="RktValLink" data-pltdoc="x">format</a></span><span class="stt"> </span><span class="RktVar">format-string-expr</span><span class="stt"> </span><span class="RktVar">v</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span>
only if the logger has receivers that are interested in the event. In
addition, the current continuation&rsquo;s <a href="eval-model.html#%28tech._continuation._mark%29" class="techoutside" data-pltdoc="x"><span class="techinside">continuation marks</span></a> are
sent to the logger with the message string.</div></p><p>These form are convenient for using the current logger, but libraries
should generally use a logger for a specific topic&#8212;<wbr></wbr>typically through
similar convenience forms generated by <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxLink" data-pltdoc="x">define-logger</a></span>.</p><p>For each <span class="RktKw">log-</span><span class="RktVar">level</span>,</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktKw">log-</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span><span class="RktPn">)</span></p></blockquote><p>is equivalent to</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let%29%29" class="RktStxLink" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">l</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValLink" data-pltdoc="x">current-logger</a></span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="when_unless.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._when%29%29" class="RktStxLink" data-pltdoc="x">when</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-level~3f%29%29" class="RktValLink" data-pltdoc="x">log-level?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVar">level</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-message%29%29" class="RktValLink" data-pltdoc="x">log-message</a></span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span><span class="RktVar">string-expr</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._current-continuation-marks%29%29" class="RktValLink" data-pltdoc="x">current-continuation-marks</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>while</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktKw">log-</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span></p></blockquote><p>is equivalent to</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktKw">log-</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._format%29%29" class="RktValLink" data-pltdoc="x">format</a></span><span class="hspace">&nbsp;</span><span class="RktVar">format-string-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;receiving-logged-events&quot;">15.5.3<tt>&nbsp;</tt><a name="(part._receiving-logged-events)"></a>Receiving Logged Events</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._log-receiver~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-receiver~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-receiver?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a>, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-log-receiver))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-log-receiver</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>[<span class="RktVar">topic</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span>]<span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-receiver~3f%29%29" class="RktValLink" data-pltdoc="x">log-receiver?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">logger</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._logger~3f%29%29" class="RktValLink" data-pltdoc="x">logger?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> to receive events of detail
<span class="RktVar">level</span> and lower as reported to <span class="RktVar">logger</span> and its
descendants, as long as either <span class="RktVar">topic</span> is <span class="RktVal">#f</span> or the
event&rsquo;s topic matches <span class="RktVar">topic</span>.</div></p><p>A <a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a> is a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a>. It becomes
<a href="sync.html#%28tech._ready._for._synchronization%29" class="techoutside" data-pltdoc="x"><span class="techinside">ready for synchronization</span></a> when a logging event is
received, so use <span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._sync%29%29" class="RktValLink" data-pltdoc="x">sync</a></span> to receive a logged event. The
<a href="#%28tech._log._receiver%29" class="techoutside" data-pltdoc="x"><span class="techinside">log receiver</span></a>&rsquo;s <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is an immutable vector containing
four values: the level of the event as a symbol, an immutable string
for the event message, an arbitrary value that was supplied as the
last argument to <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._log-message%29%29" class="RktValLink" data-pltdoc="x">log-message</a></span> when the event was logged, and a
symbol or <span class="RktVal">#f</span> for the event topic.</p><p>Multiple pairs of <span class="RktVar">level</span> and <span class="RktVar">topic</span> can be provided to
indicate different specific <span class="RktVar">level</span>s for different
<span class="RktVar">topic</span>s (where <span class="RktVar">topic</span> defaults to <span class="RktVal">#f</span> only for
the last given <span class="RktVar">level</span>). A <span class="RktVar">level</span> for a <span class="RktVal">#f</span>
<span class="RktVar">topic</span> applies only to events whose topic does not match any other
provided <span class="RktVar">topic</span>. If the same <span class="RktVar">topic</span> is provided multiple
times, the <span class="RktVar">level</span> provided with the last instance in the
argument list takes precedence.</p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Additional_Logging_Functions&quot;">15.5.4<tt>&nbsp;</tt><a name="(part._.Additional_.Logging_.Functions)"></a><a name="(mod-path._racket/logging)"></a>Additional Logging Functions</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Flogging%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/logging</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="#%28mod-path._racket%2Flogging%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/logging</span></a> and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> libraries, but not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/logging..rkt)._log-level/c))"></a><span title="Provided from: racket/logging, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValDef RktValLink" data-pltdoc="x">log-level/c</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a valid logging level (<span class="RktVal">'</span><span class="RktVal">none</span>,
<span class="RktVal">'</span><span class="RktVal">fatal</span>, <span class="RktVal">'</span><span class="RktVal">error</span>, <span class="RktVal">'</span><span class="RktVal">warning</span>, <span class="RktVal">'</span><span class="RktVal">info</span>, or
<span class="RktVal">'</span><span class="RktVal">debug</span>), <span class="RktVal">#f</span> otherwise.</div></p><p class="SHistory">Added in version 6.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/logging..rkt)._with-intercepted-logging))"></a><span title="Provided from: racket/logging, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-intercepted-logging%29%29" class="RktValDef RktValLink" data-pltdoc="x">with-intercepted-logging</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">interceptor</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">level</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">topic</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span>]</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">interceptor</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fvector..rkt%29._vector%2Fc%29%29" class="RktValLink" data-pltdoc="x">vector/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Runs <span class="RktVar">proc</span>, calling <span class="RktVar">interceptor</span> on any log event that would
be received by <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="RktValLink" data-pltdoc="x">make-log-receiver</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValLink" data-pltdoc="x">current-logger</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">level</span><span class="stt"> </span><span class="RktVar">topic</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span>.
Returns whatever <span class="RktVar">proc</span> returns.</div></p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let%29%29" class="RktStxLink" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">warning-counter</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-intercepted-logging%29%29" class="RktValLink" data-pltdoc="x">with-intercepted-logging</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">l</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="when_unless.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._when%29%29" class="RktStxLink" data-pltdoc="x">when</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector-ref%29%29" class="RktValLink" data-pltdoc="x">vector-ref</a></span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">warning</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="set_.html#%28form._%28%28quote._~23~25kernel%29._set%21%29%29" class="RktStxLink" data-pltdoc="x">set!</a></span><span class="hspace">&nbsp;</span><span class="RktSym">warning-counter</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._add1%29%29" class="RktValLink" data-pltdoc="x">add1</a></span><span class="hspace">&nbsp;</span><span class="RktSym">warning-counter</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Warning!"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Warning again!"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29" class="RktValLink" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">warning</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">warning-counter</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr></table></blockquote></div></p><p class="SHistory">Added in version 6.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/logging..rkt)._with-logging-to-port))"></a><span title="Provided from: racket/logging, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-logging-to-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">with-logging-to-port</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">level</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">topic</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span>]</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">level</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._log-level%2Fc%29%29" class="RktValLink" data-pltdoc="x">log-level/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">topic</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Runs <span class="RktVar">proc</span>, outputting any logging that would be received by
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-log-receiver%29%29" class="RktValLink" data-pltdoc="x">make-log-receiver</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._current-logger%29%29" class="RktValLink" data-pltdoc="x">current-logger</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">level</span><span class="stt"> </span><span class="RktVar">topic</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> to <span class="RktVar">port</span>.
Returns whatever <span class="RktVar">proc</span> returns.</div></p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let%29%29" class="RktStxLink" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">my-log</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="stringport.html#%28def._%28%28quote._~23~25kernel%29._open-output-string%29%29" class="RktValLink" data-pltdoc="x">open-output-string</a></span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Flogging..rkt%29._with-logging-to-port%29%29" class="RktValLink" data-pltdoc="x">with-logging-to-port</a></span><span class="hspace">&nbsp;</span><span class="RktSym">my-log</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-warning%29%29" class="RktStxLink" data-pltdoc="x">log-warning</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Warning World!"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29" class="RktValLink" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">warning</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="stringport.html#%28def._%28%28quote._~23~25kernel%29._get-output-string%29%29" class="RktValLink" data-pltdoc="x">get-output-string</a></span><span class="hspace">&nbsp;</span><span class="RktSym">my-log</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">"Warning World!\n"</span></p></td></tr></table></blockquote></div></p><p class="SHistory">Added in version 6.3 of package <span class="stt">base</span>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="subprocess.html" title="backward to &quot;15.4 Processes&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="os.html" title="up to &quot;15 Operating System&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="time.html" title="forward to &quot;15.6 Time&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>