root/trunk/process_log.php

Revision 334, 1.6 kB (checked in by padams, 21 months ago)

fixed various php warnings for undefined varioables.

Addded aync even processing flag to module abstract class to prevent
logging event handlers from being registered.


Line 
1#!/usr/local/bin/php -q
2
3<?php
4
5//
6// Open Web Analytics - An Open Source Web Analytics Framework
7//
8// Copyright 2006 Peter Adams. All rights reserved.
9//
10// Licensed under GPL v2.0 http://www.gnu.org/copyleft/gpl.html
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17//
18// $Id$
19//
20
21require_once 'owa_env.php';
22require_once 'asyncEventProcessor.php';
23
24/**
25 * Batch Event Processing Script
26 *
27 * This script should be run by another script or scheduled by a CRON type
28 * scheduler.
29 *
30 * @author      Peter Adams <peter@openwebanalytics.com>
31 * @copyright   Copyright &copy; 2006 Peter Adams <peter@openwebanalytics.com>
32 * @license     http://www.gnu.org/copyleft/gpl.html GPL v2.0
33 * @category    owa
34 * @package     owa
35 * @version             $Revision$           
36 * @since               owa 1.0.0
37 */
38
39// parse args into it's own array
40if ($argv):
41   for ($i=1; $i<count($argv);$i++)
42   {
43       $it = split("=",$argv[$i]);
44       $_argv[$it[0]] = $it[1];
45   }
46
47endif;
48
49// create instance of OWA
50$config = array();
51$config['async_db'] = false;
52$owa = new asyncEventProcessor($config);
53
54//normal run
55if(empty($_argv)):
56       
57        $owa->process_standard();
58        return;   
59// Process a specific file
60// syntax is: file=filename.txt
61elseif (!empty($_argv['file'])):
62       
63        $owa->process_specific($config['async_log_dir'].$_argv['file']);
64        return;
65
66endif;
67
68
69
70?>
Note: See TracBrowser for help on using the browser.