630 lines
31 KiB
HTML
630 lines
31 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>LogChannel Struct Reference</title>
|
||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||
<meta charset='utf-8'>
|
||
<script src="../js/jquery.min.js" defer></script>
|
||
<script src="../js/jazzy.js" defer></script>
|
||
|
||
</head>
|
||
<body>
|
||
<a name="//apple_ref/swift/Struct/LogChannel" class="dashAnchor"></a>
|
||
<a title="LogChannel Struct Reference"></a>
|
||
<header>
|
||
<div class="content-wrapper">
|
||
<p><a href="../index.html">CleanroomLogger Docs</a> (100% documented)</p>
|
||
<p class="header-right"><a href="https://github.com/emaloney/CleanroomLogger"><img src="../img/gh.png"/>View on GitHub</a></p>
|
||
</div>
|
||
</header>
|
||
<div class="content-wrapper">
|
||
<p id="breadcrumbs">
|
||
<a href="../index.html">CleanroomLogger Reference</a>
|
||
<img id="carat" src="../img/carat.png" />
|
||
LogChannel Struct Reference
|
||
</p>
|
||
</div>
|
||
<div class="content-wrapper">
|
||
<nav class="sidebar">
|
||
<ul class="nav-groups">
|
||
<li class="nav-group-name">
|
||
<a href="../Classes.html">Classes</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/BasicLogConfiguration.html">BasicLogConfiguration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/BufferedLogEntryMessageRecorder.html">BufferedLogEntryMessageRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/BufferedLogEntryRecorder.html">BufferedLogEntryRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/BufferedLogRecorder.html">BufferedLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/BufferedMessageRecorder.html">BufferedMessageRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/ConcatenatingLogFormatter.html">ConcatenatingLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/ConsoleLogConfiguration.html">ConsoleLogConfiguration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/ConsoleLogConfiguration/StandardStreamsMode.html">– StandardStreamsMode</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/FieldBasedLogFormatter.html">FieldBasedLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/FieldBasedLogFormatter/Field.html">– Field</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/FileLogRecorder.html">FileLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/LogReceptacle.html">LogReceptacle</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/LogRecorderBase.html">LogRecorderBase</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/OutputStreamLogRecorder.html">OutputStreamLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/ParsableLogFormatter.html">ParsableLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/ReadableLogFormatter.html">ReadableLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/RotatingLogFileConfiguration.html">RotatingLogFileConfiguration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/RotatingLogFileRecorder.html">RotatingLogFileRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/StandardErrorLogRecorder.html">StandardErrorLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/StandardLogFormatter.html">StandardLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/StandardOutputLogRecorder.html">StandardOutputLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/StandardStreamsLogRecorder.html">StandardStreamsLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/XcodeLogConfiguration.html">XcodeLogConfiguration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/XcodeLogFormatter.html">XcodeLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Classes/XcodeTraceLogFormatter.html">XcodeTraceLogFormatter</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="../Enums.html">Enums</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/CallingThreadStyle.html">CallingThreadStyle</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/DelimiterStyle.html">DelimiterStyle</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/LogSeverity.html">LogSeverity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/OSLogTypeTranslator.html">OSLogTypeTranslator</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/SeverityStyle.html">SeverityStyle</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/SeverityStyle/TextRepresentation.html">– TextRepresentation</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Enums/TimestampStyle.html">TimestampStyle</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="../Protocols.html">Protocols</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="../Protocols/LogConfiguration.html">LogConfiguration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Protocols/LogFilter.html">LogFilter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Protocols/LogFormatter.html">LogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Protocols/LogRecorder.html">LogRecorder</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="../Structs.html">Structs</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/CallSiteLogFormatter.html">CallSiteLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/CallingThreadLogFormatter.html">CallingThreadLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/DelimiterLogFormatter.html">DelimiterLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/LiteralLogFormatter.html">LiteralLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/Log.html">Log</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/LogChannel.html">LogChannel</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/LogEntry.html">LogEntry</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/LogEntry/Payload.html">– Payload</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/LogSeverityFilter.html">LogSeverityFilter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/OSLogRecorder.html">OSLogRecorder</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/PayloadLogFormatter.html">PayloadLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/PayloadMessageLogFormatter.html">PayloadMessageLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/PayloadTraceLogFormatter.html">PayloadTraceLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/PayloadValueLogFormatter.html">PayloadValueLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/ProcessIDLogFormatter.html">ProcessIDLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/ProcessNameLogFormatter.html">ProcessNameLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/SeverityLogFormatter.html">SeverityLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/StackFrameLogFormatter.html">StackFrameLogFormatter</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="../Structs/TimestampLogFormatter.html">TimestampLogFormatter</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<article class="main-content">
|
||
<section>
|
||
<section class="section">
|
||
<h1>LogChannel</h1>
|
||
<div class="declaration">
|
||
<div class="language">
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LogChannel</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<p><code>LogChannel</code> instances provide the high-level interface for accepting log
|
||
messages.</p>
|
||
|
||
<p>They are responsible for converting log requests into <code><a href="../Structs/LogEntry.html">LogEntry</a></code> instances
|
||
that they then pass along to their associated <code><a href="../Classes/LogReceptacle.html">LogReceptacle</a></code>s to perform the
|
||
actual logging.</p>
|
||
|
||
<p><code>LogChannel</code>s are provided as a convenience, exposed as static properties
|
||
through <code><a href="../Structs/Log.html">Log</a></code>. Use of <code>LogChannel</code>s and the <code><a href="../Structs/Log.html">Log</a></code> is not required for logging;
|
||
you can also perform logging by creating <code><a href="../Structs/LogEntry.html">LogEntry</a></code> instances manually and
|
||
passing them along to a <code><a href="../Classes/LogReceptacle.html">LogReceptacle</a></code>.</p>
|
||
|
||
</section>
|
||
<section class="section task-group-section">
|
||
<div class="task-group">
|
||
<ul>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelV8severityAA0C8SeverityOv"></a>
|
||
<a name="//apple_ref/swift/Property/severity" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelV8severityAA0C8SeverityOv">severity</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>The <code><a href="../Enums/LogSeverity.html">LogSeverity</a></code> of this <code>LogChannel</code>, which determines the severity
|
||
of the <code><a href="../Structs/LogEntry.html">LogEntry</a></code> instances it creates.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">severity</span><span class="p">:</span> <span class="kt"><a href="../Enums/LogSeverity.html">LogSeverity</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelV10receptacleAA0C10ReceptacleCv"></a>
|
||
<a name="//apple_ref/swift/Property/receptacle" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelV10receptacleAA0C10ReceptacleCv">receptacle</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>The <code><a href="../Classes/LogReceptacle.html">LogReceptacle</a></code> into which this <code>LogChannel</code> will deposit the
|
||
<code><a href="../Structs/LogEntry.html">LogEntry</a></code> instances it creates.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">receptacle</span><span class="p">:</span> <span class="kt"><a href="../Classes/LogReceptacle.html">LogReceptacle</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelVAcA0C8SeverityO8severity_AA0C10ReceptacleC10receptacletcfc"></a>
|
||
<a name="//apple_ref/swift/Method/init(severity:receptacle:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelVAcA0C8SeverityO8severity_AA0C10ReceptacleC10receptacletcfc">init(severity:receptacle:)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Initializes a new <code>LogChannel</code> instance.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">severity</span><span class="p">:</span> <span class="kt"><a href="../Enums/LogSeverity.html">LogSeverity</a></span><span class="p">,</span> <span class="nv">receptacle</span><span class="p">:</span> <span class="kt"><a href="../Classes/LogReceptacle.html">LogReceptacle</a></span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>severity</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The <code>LogSeverity</code> to use for each <code>LogEntry</code> created
|
||
by the channel.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>receptacle</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The <code>LogReceptacle</code> to be used for depositing the
|
||
<code>LogEntry</code> instances created by the channel.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelV5traceySS_SS8filePathSi0F4LinetF"></a>
|
||
<a name="//apple_ref/swift/Method/trace(_:filePath:fileLine:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelV5traceySS_SS8filePathSi0F4LinetF">trace(_:filePath:fileLine:)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Sends program execution trace information to the log using the receiver’s
|
||
severity. This information includes source-level call site information as
|
||
well as the stack frame signature of the caller.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">trace</span><span class="p">(</span><span class="n">_</span> <span class="nv">function</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">function</span><span class="p">,</span> <span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">file</span><span class="p">,</span> <span class="nv">fileLine</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="err">#</span><span class="n">line</span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>function</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the signature of the calling function. You should not provide a
|
||
value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>filePath</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the file path of the code issuing the call to this function.
|
||
You should not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>fileLine</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the line number issuing the call to this function. You should
|
||
not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelV7messageySS_SS8functionSS8filePathSi0G4LinetF"></a>
|
||
<a name="//apple_ref/swift/Method/message(_:function:filePath:fileLine:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelV7messageySS_SS8functionSS8filePathSi0G4LinetF">message(_:function:filePath:fileLine:)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Sends a message string to the log using the receiver’s severity.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">message</span><span class="p">(</span><span class="n">_</span> <span class="nv">msg</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">function</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">function</span><span class="p">,</span> <span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">file</span><span class="p">,</span> <span class="nv">fileLine</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="err">#</span><span class="n">line</span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>msg</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The message to send to the log.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>function</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the signature of the calling function. You should not provide a
|
||
value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>filePath</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the file path of the code issuing the call to this function.
|
||
You should not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>fileLine</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the line number issuing the call to this function. You should
|
||
not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:15CleanroomLogger10LogChannelV5valueyypSg_SS8functionSS8filePathSi0G4LinetF"></a>
|
||
<a name="//apple_ref/swift/Method/value(_:function:filePath:fileLine:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:15CleanroomLogger10LogChannelV5valueyypSg_SS8functionSS8filePathSi0G4LinetF">value(_:function:filePath:fileLine:)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Sends an arbitrary value to the log using the receiver’s severity.</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">value</span><span class="p">(</span><span class="n">_</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">Any</span><span class="p">?,</span> <span class="nv">function</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">function</span><span class="p">,</span> <span class="nv">filePath</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="err">#</span><span class="n">file</span><span class="p">,</span> <span class="nv">fileLine</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="err">#</span><span class="n">line</span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>value</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The value to send to the log. Determining how (and
|
||
whether) arbitrary values are captured and represented will be handled by
|
||
the <code>LogRecorder</code> implementation(s) that are ultimately called upon to
|
||
record the log entry.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>function</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the signature of the calling function. You should not provide a
|
||
value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>filePath</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the file path of the code issuing the call to this function.
|
||
You should not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>fileLine</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>The default value provided for this parameter
|
||
captures the line number issuing the call to this function. You should
|
||
not provide a value for this parameter.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<section id="footer">
|
||
<p>© 2015-2017 <a class="link" href="http://tech.gilt.com/" target="_blank" rel="external">Gilt Groupe</a></p>
|
||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||
</section>
|
||
</article>
|
||
</div>
|
||
</body>
|
||
</div>
|
||
</html>
|