adding an openlog command to redirect syslog appropriately
authorToby Elliott <telliott@mozilla.com>
Thu, 06 May 2010 10:10:26 -0700
changeset 84 19a7b85f7515ba025b9a837b2a1b1dd4e5628797
parent 83 5a54fcc7ecf59ca99925c1768c69ad1d60fc2012
child 85 24bba735d86d108c3365a6cdad1561b0d50d04b2
child 87 211f1a876bd800937d163e8f8e4a27f9b15ead68
push id1
push usertziade@mozilla.com
push dateTue, 19 Oct 2010 10:41:37 +0000
adding an openlog command to redirect syslog appropriately
1.0/cef.php
--- a/1.0/cef.php
+++ b/1.0/cef.php
@@ -5,16 +5,17 @@ class CommonEventFormat
 
 	function __construct($vendor, $product, $deviceVersion, $version = 0, $filehandle = 'syslog')
 	{
 		$this->_vendor = preg_replace('/\|/', '\\\|', $vendor);
 		$this->_product = preg_replace('/\|/', '\\\|', $product);
 		$this->_deviceVersion = preg_replace('/\|/', '\\\|', $deviceVersion);
 		$this->_version = preg_replace('/\|/', '\\\|', $version);
 		$this->_filehandle = $filehandle;
+		openlog('weave', LOG_ODELAY, LOG_LOCAL4);
 	}
 
 	function logMessage($message)
 	{
 		if (!(get_class($message) == 'CommonEventFormatMessage' || is_subclass_of($message, 'CommonEventFormatMessage')))
 			throw new Exception("Message is not CommonEventFormatMessage or derivative");
 		
 		$sig = preg_replace('/\|/', '\\\|', $message->signature);