binaryninja/personal/api-docs/binaryninja.log-module.html

591 lines
34 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>log module &mdash; Binary Ninja API Documentation v1.1</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/other.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Binary Ninja API Documentation v1.1" href="index.html"/>
<link rel="next" title="binaryninja.log.close_logs" href="binaryninja.log.close_logs.html"/>
<link rel="prev" title="binaryninja.lineardisassembly.LinearDisassemblyPosition" href="binaryninja.lineardisassembly.LinearDisassemblyPosition.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Binary Ninja API
</a>
<div class="version">
<script>
window.addEventListener("load", function() {
var ver = document.getElementsByClassName("version");
ver[0].innerHTML = DOCUMENTATION_OPTIONS['VERSION'];
});
</script>
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="binaryninja.architecture-module.html">architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.atexit-module.html">atexit</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.basicblock-module.html">basicblock</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.binaryview-module.html">binaryview</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.callingconvention-module.html">callingconvention</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.databuffer-module.html">databuffer</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.datarender-module.html">datarender</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.demangle-module.html">demangle</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.downloadprovider-module.html">downloadprovider</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.enums-module.html">enums</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.fileaccessor-module.html">fileaccessor</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.filemetadata-module.html">filemetadata</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.flowgraph-module.html">flowgraph</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.function-module.html">function</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.functionrecognizer-module.html">functionrecognizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.highlight-module.html">highlight</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.interaction-module.html">interaction</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.lineardisassembly-module.html">lineardisassembly</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">log</a><ul>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.close_logs.html">binaryninja.log.close_logs</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.is_output_redirected_to_log.html">binaryninja.log.is_output_redirected_to_log</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log.html">binaryninja.log.log</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_alert.html">binaryninja.log.log_alert</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_debug.html">binaryninja.log.log_debug</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_error.html">binaryninja.log.log_error</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_info.html">binaryninja.log.log_info</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_to_file.html">binaryninja.log.log_to_file</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_to_stderr.html">binaryninja.log.log_to_stderr</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_to_stdout.html">binaryninja.log.log_to_stdout</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.log_warn.html">binaryninja.log.log_warn</a></li>
<li class="toctree-l2"><a class="reference internal" href="binaryninja.log.redirect_output_to_log.html">binaryninja.log.redirect_output_to_log</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.lowlevelil-module.html">lowlevelil</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.mainthread-module.html">mainthread</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.mediumlevelil-module.html">mediumlevelil</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.metadata-module.html">metadata</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.numbers-module.html">numbers</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.platform-module.html">platform</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.plugin-module.html">plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.pluginmanager-module.html">pluginmanager</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.scriptingprovider-module.html">scriptingprovider</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.settings-module.html">settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.transform-module.html">transform</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.types-module.html">types</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.undoaction-module.html">undoaction</a></li>
<li class="toctree-l1"><a class="reference internal" href="binaryninja.update-module.html">update</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Binary Ninja API</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>log module</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/binaryninja.log-module.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="log-module">
<h1>log module<a class="headerlink" href="#log-module" title="Permalink to this headline"></a></h1>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.close_logs.html#binaryninja.log.close_logs" title="binaryninja.log.close_logs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.close_logs</span></code></a>()</td>
<td><code class="docutils literal notranslate"><span class="pre">close_logs</span></code> close all log files.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.is_output_redirected_to_log.html#binaryninja.log.is_output_redirected_to_log" title="binaryninja.log.is_output_redirected_to_log"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.is_output_redirected_to_log</span></code></a>()</td>
<td></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.log.html#binaryninja.log.log" title="binaryninja.log.log"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log</span></code></a>(level,&nbsp;text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log</span></code> writes messages to the log console for the given log level.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.log_alert.html#binaryninja.log.log_alert" title="binaryninja.log.log_alert"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_alert</span></code></a>(text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_alert</span></code> Logs message console and to a pop up window if run through the GUI.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.log_debug.html#binaryninja.log.log_debug" title="binaryninja.log.log_debug"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_debug</span></code></a>(text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_debug</span></code> Logs debugging information messages to the console.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.log_error.html#binaryninja.log.log_error" title="binaryninja.log.log_error"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_error</span></code></a>(text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_error</span></code> Logs message to console, if run through the GUI it logs with <strong>Error</strong> icon, focusing the error console.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.log_info.html#binaryninja.log.log_info" title="binaryninja.log.log_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_info</span></code></a>(text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_info</span></code> Logs general information messages to the console.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.log_to_file.html#binaryninja.log.log_to_file" title="binaryninja.log.log_to_file"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_to_file</span></code></a>(min_level,&nbsp;path)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_to_file</span></code> redirects minimum log level to a file named <code class="docutils literal notranslate"><span class="pre">path</span></code>, optionally appending rather than overwriting.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.log_to_stderr.html#binaryninja.log.log_to_stderr" title="binaryninja.log.log_to_stderr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_to_stderr</span></code></a>(min_level)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_to_stderr</span></code> redirects minimum log level to standard error.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.log_to_stdout.html#binaryninja.log.log_to_stdout" title="binaryninja.log.log_to_stdout"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_to_stdout</span></code></a>([min_level])</td>
<td><code class="docutils literal notranslate"><span class="pre">log_to_stdout</span></code> redirects minimum log level to standard out.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="binaryninja.log.log_warn.html#binaryninja.log.log_warn" title="binaryninja.log.log_warn"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.log_warn</span></code></a>(text)</td>
<td><code class="docutils literal notranslate"><span class="pre">log_warn</span></code> Logs message to console, if run through the GUI it logs with <strong>Warning</strong> icon.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="binaryninja.log.redirect_output_to_log.html#binaryninja.log.redirect_output_to_log" title="binaryninja.log.redirect_output_to_log"><code class="xref py py-obj docutils literal notranslate"><span class="pre">binaryninja.log.redirect_output_to_log</span></code></a>()</td>
<td></td>
</tr>
</tbody>
</table>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-binaryninja.log"></span><dl class="function">
<dt id="binaryninja.log.close_logs">
<code class="descname">close_logs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#close_logs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.close_logs" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">close_logs</span></code> close all log files.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.is_output_redirected_to_log">
<code class="descname">is_output_redirected_to_log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#is_output_redirected_to_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.is_output_redirected_to_log" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="binaryninja.log.log">
<code class="descname">log</code><span class="sig-paren">(</span><em>level</em>, <em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log</span></code> writes messages to the log console for the given log level.</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="9%" />
<col width="78%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">LogLevelName</th>
<th class="head">LogLevel</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>DebugLog</td>
<td>0</td>
<td>Logs debuging information messages to the console.</td>
</tr>
<tr class="row-odd"><td>InfoLog</td>
<td>1</td>
<td>Logs general information messages to the console.</td>
</tr>
<tr class="row-even"><td>WarningLog</td>
<td>2</td>
<td>Logs message to console with <strong>Warning</strong> icon.</td>
</tr>
<tr class="row-odd"><td>ErrorLog</td>
<td>3</td>
<td>Logs message to console with <strong>Error</strong> icon, focusing the error console.</td>
</tr>
<tr class="row-even"><td>AlertLog</td>
<td>4</td>
<td>Logs message to pop up window.</td>
</tr>
</tbody>
</table>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>level</strong> (<a class="reference internal" href="binaryninja.enums.LogLevel.html#binaryninja.enums.LogLevel" title="binaryninja.enums.LogLevel"><em>LogLevel</em></a>) Log level to use</li>
<li><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_alert">
<code class="descname">log_alert</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_alert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_alert" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_alert</span></code> Logs message console and to a pop up window if run through the GUI.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_to_stdout</span><span class="p">(</span><span class="n">LogLevel</span><span class="o">.</span><span class="n">DebugLog</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_alert</span><span class="p">(</span><span class="s2">&quot;Kielbasa!&quot;</span><span class="p">)</span>
<span class="go">Kielbasa!</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_debug">
<code class="descname">log_debug</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_debug"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_debug" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_debug</span></code> Logs debugging information messages to the console.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_to_stdout</span><span class="p">(</span><span class="n">LogLevel</span><span class="o">.</span><span class="n">DebugLog</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_debug</span><span class="p">(</span><span class="s2">&quot;Hotdogs!&quot;</span><span class="p">)</span>
<span class="go">Hotdogs!</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_error">
<code class="descname">log_error</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_error" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_error</span></code> Logs message to console, if run through the GUI it logs with <strong>Error</strong> icon, focusing the error console.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_to_stdout</span><span class="p">(</span><span class="n">LogLevel</span><span class="o">.</span><span class="n">DebugLog</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_error</span><span class="p">(</span><span class="s2">&quot;Spanferkel!&quot;</span><span class="p">)</span>
<span class="go">Spanferkel!</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_info">
<code class="descname">log_info</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_info" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_info</span></code> Logs general information messages to the console.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_info</span><span class="p">(</span><span class="s2">&quot;Saucisson!&quot;</span><span class="p">)</span>
<span class="go">Saucisson!</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_to_file">
<code class="descname">log_to_file</code><span class="sig-paren">(</span><em>min_level</em>, <em>path</em>, <em>append=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_to_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_to_file" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_to_file</span></code> redirects minimum log level to a file named <code class="docutils literal notranslate"><span class="pre">path</span></code>, optionally appending rather than overwriting.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>min_level</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) minimum level to log to</li>
<li><strong>path</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) path to log to</li>
<li><strong>append</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><em>bool</em></a>) optional flag for specifying appending. True = append, False = overwrite.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_to_stderr">
<code class="descname">log_to_stderr</code><span class="sig-paren">(</span><em>min_level</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_to_stderr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_to_stderr" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_to_stderr</span></code> redirects minimum log level to standard error.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>min_level</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) minimum level to log to</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_to_stdout">
<code class="descname">log_to_stdout</code><span class="sig-paren">(</span><em>min_level=&lt;LogLevel.InfoLog: 1&gt;</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_to_stdout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_to_stdout" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_to_stdout</span></code> redirects minimum log level to standard out.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>min_level</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) minimum level to log to</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_debug</span><span class="p">(</span><span class="s2">&quot;Hotdogs!&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_to_stdout</span><span class="p">(</span><span class="n">LogLevel</span><span class="o">.</span><span class="n">DebugLog</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_debug</span><span class="p">(</span><span class="s2">&quot;Hotdogs!&quot;</span><span class="p">)</span>
<span class="go">Hotdogs!</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.log_warn">
<code class="descname">log_warn</code><span class="sig-paren">(</span><em>text</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#log_warn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.log_warn" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal notranslate"><span class="pre">log_warn</span></code> Logs message to console, if run through the GUI it logs with <strong>Warning</strong> icon.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>text</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) message to print</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2/library/constants.html#None" title="(in Python v2.7)">None</a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Example:</th><td class="field-body"><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">log_to_stdout</span><span class="p">(</span><span class="n">LogLevel</span><span class="o">.</span><span class="n">DebugLog</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">log_info</span><span class="p">(</span><span class="s2">&quot;Chilidogs!&quot;</span><span class="p">)</span>
<span class="go">Chilidogs!</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="binaryninja.log.redirect_output_to_log">
<code class="descname">redirect_output_to_log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/binaryninja/log.html#redirect_output_to_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#binaryninja.log.redirect_output_to_log" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="binaryninja.log.close_logs.html" class="btn btn-neutral float-right" title="binaryninja.log.close_logs" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="binaryninja.lineardisassembly.LinearDisassemblyPosition.html" class="btn btn-neutral" title="binaryninja.lineardisassembly.LinearDisassemblyPosition" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2015-2019, Vector 35 Inc.
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>