split-logfile.html.en revision cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4
5693N/A<?xml version="1.0" encoding="ISO-8859-1"?>
5693N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5693N/A<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
5693N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5693N/A This file is generated from xml source: DO NOT EDIT
5693N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5693N/A -->
5693N/A<title>split-logfile - Split up multi-vhost logfiles - Apache HTTP Server</title>
5693N/A<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
5693N/A<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
5693N/A<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
5693N/A<script src="/style/scripts/prettify.js" type="text/javascript">
5693N/A</script>
5693N/A
5693N/A<link href="/images/favicon.ico" rel="shortcut icon" /></head>
5693N/A<body id="manual-page" class="no-sidebar"><div id="page-header">
5693N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
5693N/A<p class="apache">Apache HTTP Server Version 2.5</p>
5693N/A<img alt="" src="/images/feather.gif" /></div>
5693N/A<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
5693N/A<div id="path">
5693N/A<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>split-logfile - Split up multi-vhost logfiles</h1>
5693N/A<div class="toplang">
5693N/A<p><span>Available Languages: </span><a href="/en/programs/other.html" title="English">&nbsp;en&nbsp;</a> |
5693N/A<a href="/ko/programs/other.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
6350N/A<a href="/tr/programs/other.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
5693N/A</div>
5693N/A
5693N/A <p>This perl script will take a combined Web server access log file and
5693N/A break its contents into separate files. It assumes that the first field of
5693N/A each line is the virtual host identity, put there using the "<code>%v</code>"
5693N/A variable in <code class="directive"><a href="/mod/mod_log_config.html#logformat">LogFormat</a></code>.
5693N/A </p>
5693N/A</div>
5693N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
5693N/A<div class="section">
5693N/A<h2><a name="split-logfile" id="split-logfile">Usage</a></h2>
5693N/A
5693N/A <p>Create a log file with virtual host information in it:</p>
5693N/A
5693N/A <pre class="prettyprint lang-config">
5693N/ALogFormat "%v %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost
5693N/ACustomLog logs/access_log combined_plus_vhost
5693N/A </pre>
5693N/A
5693N/A
5693N/A <p>Log files will be created, in the directory where you run the
5693N/A script, for each virtual host name that appears in the combined log file.
5693N/A These logfiles will named after the hostname, with a
5693N/A <code>.log</code> file extension.</p>
5693N/A
5693N/A <p>The combined log file is read from stdin. Records read will be appended
5693N/A to any existing log files.</p>
5693N/A
5693N/A <div class="example"><p><code>split-logfile &lt; access_log</code></p></div>
5693N/A
5693N/A
5693N/A</div></div>
5693N/A<div class="bottomlang">
6350N/A<p><span>Available Languages: </span><a href="/en/programs/other.html" title="English">&nbsp;en&nbsp;</a> |
5693N/A<a href="/ko/programs/other.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
5693N/A<a href="/tr/programs/other.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
5693N/A</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
5693N/A<script type="text/javascript"><!--//--><![CDATA[//><!--
5693N/Avar comments_shortname = 'httpd';
5693N/Avar comments_identifier = 'http://httpd.apache.org/docs/trunk/programs/other.html';
5693N/A(function(w, d) {
5693N/A if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
5693N/A d.write('<div id="comments_thread"><\/div>');
5693N/A var s = d.createElement('script');
5693N/A s.type = 'text/javascript';
5693N/A s.async = true;
5693N/A s.src = 'http://c.apaste.info/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
5693N/A (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
5693N/A }
5693N/A else {
6350N/A d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
6350N/A }
6350N/A})(window, document);
6350N/A//--><!]]></script></div><div id="footer">
6350N/A<p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
6350N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
6350N/Aif (typeof(prettyPrint) !== 'undefined') {
5693N/A prettyPrint();
5693N/A}
5693N/A//--><!]]></script>
6350N/A</body></html>