<?xml version="1.0" encoding="utf-8" standalone="no"?> <!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>High-level Logging</title> <link rel="stylesheet" type="text/css" href="styles.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /> <style type="text/css"> body { background-image: url('images/draft.png'); background-repeat: no-repeat; background-position: top left; /* The following properties make the watermark "fixed" on the page. */ /* I think that's just a bit too distracting for the reader... */ /* background-attachment: fixed; */ /* background-position: center center; */ }</style> <link rel="home" href="index.html" title="Version Control with Subversion [DRAFT]" /> <link rel="up" href="svn.serverconfig.html" title="Chapter 6. Server Configuration" /> <link rel="prev" href="svn.serverconfig.pathbasedauthz.html" title="Path-Based Authorization" /> <link rel="next" href="svn.serverconfig.optimization.html" title="Server Optimization" /> </head> <body> <div xmlns="" id="vcws-version-notice"> <p>This text is a work in progress—highly subject to change—and may not accurately describe any released version of the Apache™ Subversion® software. Bookmarking or otherwise referring others to this page is probably not such a smart idea. Please visit <a href="http://www.svnbook.com/">http://www.svnbook.com/</a> for stable versions of this book.</p> </div> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">High-level Logging</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="svn.serverconfig.pathbasedauthz.html">Prev</a> </td> <th width="60%" align="center">Chapter 6. Server Configuration</th> <td width="20%" align="right"> <a accesskey="n" href="svn.serverconfig.optimization.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="svn.serverconfig.operational-logging"></a>High-level Logging</h2> </div> </div> </div> <p>Both the Apache <span class="command"><strong>httpd</strong></span> and <span class="command"><strong>svnserve</strong></span> Subversion servers provide support for high-level logging of Subversion operations. Configuring each of the server options to provide this level of logging is done differently, of course, but the output from each is designed to conform to a uniform syntax.</p> <p>To enable high-level logging in <span class="command"><strong>svnserve</strong></span>, you need only use the <code class="option">--log-file</code> command-line option when starting the server, passing as the value to the option the file to which <span class="command"><strong>svnserve</strong></span> should write its log output.</p> <div class="informalexample"> <pre class="screen"> $ svnserve -d -r /path/to/repositories --log-file /var/log/svn.log </pre> </div> <p>Enabling the same in Apache is a bit more involved, but is essentially an extension of Apache's stock log output configuration mechanisms—see <a class="xref" href="svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.logging" title="Apache logging">the section called “Apache logging”</a> for details.</p> <p>The following is a list of Subversion action log messages produced by its high-level logging mechanism, followed by one or more examples of the log message as it appears in the log output.</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term">Checkout or export</span> </dt> <dd> <pre class="programlisting"> checkout-or-export /path r62 depth=infinity </pre> </dd> <dt> <span class="term">Commit</span> </dt> <dd> <pre class="programlisting"> commit harry r100 </pre> </dd> <dt> <span class="term">Diffs</span> </dt> <dd> <pre class="programlisting"> diff /path r15:20 depth=infinity ignore-ancestry diff /path1@15 /path2@20 depth=infinity ignore-ancestry </pre> </dd> <dt> <span class="term">Fetch a directory</span> </dt> <dd> <pre class="programlisting"> get-dir /trunk r17 text </pre> </dd> <dt> <span class="term">Fetch a file</span> </dt> <dd> <pre class="programlisting"> get-file /path r20 props </pre> </dd> <dt> <span class="term">Fetch a file revision</span> </dt> <dd> <pre class="programlisting"> get-file-revs /path r12:15 include-merged-revisions </pre> </dd> <dt> <span class="term">Fetch merge information</span> </dt> <dd> <pre class="programlisting"> get-mergeinfo (/path1 /path2) </pre> </dd> <dt> <span class="term">Lock</span> </dt> <dd> <pre class="programlisting"> lock /path steal </pre> </dd> <dt> <span class="term">Log</span> </dt> <dd> <pre class="programlisting"> log (/path1,/path2,/path3) r20:90 discover-changed-paths revprops=() </pre> </dd> <dt> <span class="term">Replay revisions (svnsync)</span> </dt> <dd> <pre class="programlisting"> replay /path r19 </pre> </dd> <dt> <span class="term">Revision property change</span> </dt> <dd> <pre class="programlisting"> change-rev-prop r50 propertyname </pre> </dd> <dt> <span class="term">Revision property list</span> </dt> <dd> <pre class="programlisting"> rev-proplist r34 </pre> </dd> <dt> <span class="term">Status</span> </dt> <dd> <pre class="programlisting"> status /path r62 depth=infinity </pre> </dd> <dt> <span class="term">Switch</span> </dt> <dd> <pre class="programlisting"> switch /pathA /pathB@50 depth=infinity </pre> </dd> <dt> <span class="term">Unlock</span> </dt> <dd> <pre class="programlisting"> unlock /path break </pre> </dd> <dt> <span class="term">Update</span> </dt> <dd> <pre class="programlisting"> update /path r17 send-copyfrom-args </pre> </dd> </dl> </div> <p>As a convenience to administrators who wish to post-process their Subversion high-level logging output (perhaps for reporting or analysis purposes), Subversion source code distributions provide a Python module (located at <code class="filename">tools/server-side/svn_server_log_parse.py</code>) which can be used to parse Subversion's log output.</p> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="svn.serverconfig.pathbasedauthz.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="svn.serverconfig.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="svn.serverconfig.optimization.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">Path-Based Authorization </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> Server Optimization</td> </tr> </table> </div> <div xmlns="" id="vcws-footer"> <hr /> <img src="images/cc-by.png" style="float: right;" /> <p>You are reading <em>Version Control with Subversion</em> (for Subversion 1.8), by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato.</p> <p>This work is licensed under the <a href="http://creativecommons.org/licenses/by/2.0/">Creative Commons Attribution License v2.0</a>.</p> <p>To submit comments, corrections, or other contributions to the text, please visit <a href="http://www.svnbook.com/">http://www.svnbook.com/</a>.</p> </div> </body> </html>