<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>8.13. Log — groonga v3.0.8 documentation</title> <link rel="stylesheet" href="../_static/groonga.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '3.0.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </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> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="top" title="groonga v3.0.8 documentation" href="../index.html" /> <link rel="up" title="8. リファレンスマニュアル" href="../reference.html" /> <link rel="next" title="8.14. API" href="api.html" /> <link rel="prev" title="8.12. Indexing" href="indexing.html" /> </head> <body> <div class="header"> <h1 class="title"> <a id="top-link" href="../index.html"> <span class="project">groonga</span> <span class="separator">-</span> <span class="description">An open-source fulltext search engine and column store.</span> </a> </h1> <div class="other-language-links"> <ul> <li><a href="../../../ja/html/reference/log.html"><img src="../_static/jp.png" alt="日本語">日本語版はこちら</a></li> </ul> </div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="api.html" title="8.14. API" accesskey="N">next</a> |</li> <li class="right" > <a href="indexing.html" title="8.12. Indexing" accesskey="P">previous</a> |</li> <li><a href="../index.html">groonga v3.0.8 documentation</a> »</li> <li><a href="../reference.html" accesskey="U">8. リファレンスマニュアル</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="log"> <h1>8.13. Log<a class="headerlink" href="#log" title="Permalink to this headline">¶</a></h1> <p>Groonga has two log files. They are process log and query log. Process log is for all of <a class="reference internal" href="executables/groonga.html"><em>groonga command</em></a> works. Query log is just for query processing.</p> <div class="section" id="process-log"> <span id="id1"></span><h2>8.13.1. Process log<a class="headerlink" href="#process-log" title="Permalink to this headline">¶</a></h2> <p>Process log is enabled by default. Log path can be customized by <a class="reference internal" href="executables/groonga.html#cmdoption--log-path"><em class="xref std std-option">--log-path</em></a> option. Each log has its log level. If a log is smaller than groonga process' log level, it's not logged. Log level can be customized by <a class="reference internal" href="executables/groonga.html#cmdoption-l"><em class="xref std std-option">-l</em></a> or <a class="reference internal" href="commands/log_level.html"><em>log_level</em></a>.</p> <div class="section" id="format"> <h3>8.13.1.1. Format<a class="headerlink" href="#format" title="Permalink to this headline">¶</a></h3> <p>Process log uses the following format:</p> <div class="highlight-none"><div class="highlight"><pre>#{TIME_STAMP}|#{L}| #{MESSAGE} </pre></div> </div> <dl class="docutils"> <dt>TIME_STAMP</dt> <dd><p class="first">It's time stamp uses the following format:</p> <div class="highlight-none"><div class="highlight"><pre>YYYY-MM-DD hh:mm:ss.SSSSSS </pre></div> </div> <dl class="docutils"> <dt>YYYY</dt> <dd>Year with four digits.</dd> <dt>MM</dt> <dd>Month with two digits.</dd> <dt>DD</dt> <dd>Day with two digits.</dd> <dt>hh</dt> <dd>Hour with two digits.</dd> <dt>mm</dt> <dd>Minute with two digits.</dd> <dt>ss</dt> <dd>Second with two digits.</dd> <dt>SSSSSS</dt> <dd>Microsecond with six digits.</dd> </dl> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>2011-07-05 06:25:18.345734 </pre></div> </div> </dd> <dt>L</dt> <dd><p class="first">Log level with a character. Here is a character and log level map.</p> <dl class="docutils"> <dt>E</dt> <dd>Emergency</dd> <dt>A</dt> <dd>Alert</dd> <dt>C</dt> <dd>Critical</dd> <dt>e</dt> <dd>Error</dd> <dt>w</dt> <dd>Warning</dd> <dt>n</dt> <dd>Notification</dd> <dt>i</dt> <dd>Information</dd> <dt>d</dt> <dd>Debug</dd> <dt>-</dt> <dd>Dump</dd> </dl> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>E </pre></div> </div> </dd> <dt>MESSAGE</dt> <dd><p class="first">Details about the log with free format.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>log opened. </pre></div> </div> </dd> </dl> <p>Example:</p> <div class="highlight-none"><div class="highlight"><pre>2011-07-05 08:35:09.276421|n| grn_init 2011-07-05 08:35:09.276553|n| RLIMIT_NOFILE(4096,4096) </pre></div> </div> </div> </div> <div class="section" id="query-log"> <span id="id2"></span><h2>8.13.2. Query log<a class="headerlink" href="#query-log" title="Permalink to this headline">¶</a></h2> <p>Query log is disabled by default. It can be enabled by <a class="reference internal" href="executables/groonga.html#cmdoption--query-log-path"><em class="xref std std-option">--query-log-path</em></a> option.</p> <div class="section" id="id3"> <h3>8.13.2.1. Format<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3> <p>Query log uses the following formats:</p> <div class="highlight-none"><div class="highlight"><pre>#{TIME_STAMP}|#{MESSAGE} #{TIME_STAMP}|#{ID}|>#{QUERY} #{TIME_STAMP}|#{ID}|:#{ELAPSED_TIME} #{PROGRESS} #{TIME_STAMP}|#{ID}|<#{ELAPSED_TIME} #{RETURN_CODE} </pre></div> </div> <dl class="docutils"> <dt>TIME_STAMP</dt> <dd><p class="first">It's time stamp uses the following format:</p> <div class="highlight-none"><div class="highlight"><pre>YYYY-MM-DD hh:mm:ss.SSSSSS </pre></div> </div> <dl class="docutils"> <dt>YYYY</dt> <dd>Year with four digits.</dd> <dt>MM</dt> <dd>Month with two digits.</dd> <dt>DD</dt> <dd>Day with two digits.</dd> <dt>hh</dt> <dd>Hour with two digits.</dd> <dt>mm</dt> <dd>Minute with two digits.</dd> <dt>ss</dt> <dd>Second with two digits.</dd> <dt>SSSSSS</dt> <dd>Microsecond with six digits.</dd> </dl> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>2011-07-05 06:25:18.345734 </pre></div> </div> </dd> <dt>ID</dt> <dd><p class="first">ID of a thread. Groonga process creates threads to process requests concurrently. Each thread outputs some logs for a request. This ID can be used to extract a log sequence by a thread.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>45ea3034 </pre></div> </div> </dd> </dl> <dl class="docutils"> <dt>></dt> <dd>A character that indicates query is started.</dd> </dl> <dl class="docutils"> <dt>:</dt> <dd>A character that indicates query is processing.</dd> </dl> <dl class="docutils"> <dt><</dt> <dd>A character that indicates query is finished.</dd> <dt>MESSAGE</dt> <dd><p class="first">Details about the log with free format.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>query log opened. </pre></div> </div> </dd> <dt>QUERY</dt> <dd><p class="first">A query to be processed.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>select users --match_columns hobby --query music </pre></div> </div> </dd> <dt>ELAPSED_TIME</dt> <dd><p class="first">Elapsed time in nanoseconds since query is started.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>000000000075770 (It means 75,770 nanoseconds.) </pre></div> </div> </dd> <dt>PROGRESS</dt> <dd><p class="first">A processed work at the time.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>select(313401) (It means that 'select' is processed and 313,401 records are remained.) </pre></div> </div> </dd> <dt>RETURN_CODE</dt> <dd><p class="first">A return code for the query.</p> <p>Example:</p> <div class="last highlight-none"><div class="highlight"><pre>rc=0 (It means return code is 0. 0 means GRN_SUCCESS.) </pre></div> </div> </dd> </dl> <p>Example:</p> <div class="highlight-none"><div class="highlight"><pre>2011-07-05 06:25:19.458756|45ea3034|>select Properties --limit 0 2011-07-05 06:25:19.458829|45ea3034|:000000000072779 select(19) 2011-07-05 06:25:19.458856|45ea3034|:000000000099998 output(0) 2011-07-05 06:25:19.458875|45ea3034|<000000000119062 rc=0 2011-07-05 06:25:19.458986|45ea3034|>quit </pre></div> </div> </div> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">8.13. Log</a><ul> <li><a class="reference internal" href="#process-log">8.13.1. Process log</a><ul> <li><a class="reference internal" href="#format">8.13.1.1. Format</a></li> </ul> </li> <li><a class="reference internal" href="#query-log">8.13.2. Query log</a><ul> <li><a class="reference internal" href="#id3">8.13.2.1. Format</a></li> </ul> </li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="indexing.html" title="previous chapter">8.12. Indexing</a></p> <h4>Next topic</h4> <p class="topless"><a href="api.html" title="next chapter">8.14. API</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/reference/log.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="api.html" title="8.14. API" >next</a> |</li> <li class="right" > <a href="indexing.html" title="8.12. Indexing" >previous</a> |</li> <li><a href="../index.html">groonga v3.0.8 documentation</a> »</li> <li><a href="../reference.html" >8. リファレンスマニュアル</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Brazil, Inc. </div> </body> </html>