From ca20fcce0798ebd6300722d5e9f7100551f47c99 Mon Sep 17 00:00:00 2001 From: uckelman Date: Thu, 15 Jul 2010 13:25:11 +0000 Subject: Added logging. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6990 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/forum_post_send.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/forum_post_send.php') diff --git a/src/forum_post_send.php b/src/forum_post_send.php index aa86422..d179226 100644 --- a/src/forum_post_send.php +++ b/src/forum_post_send.php @@ -15,6 +15,9 @@ catch (Exception $e) { function send_post_to_lists($config, $user, $mode, $data, $post_data) { + require_once('Log.php'); + $logger = &Log::singleton('file', '/var/log/listbridge', 'test2'); + /* print '

'; var_dump($data); @@ -37,6 +40,8 @@ function send_post_to_lists($config, $user, $mode, $data, $post_data) { $postId = $data['post_id']; $forumId = $data['forum_id']; + $logger->info($postId . ' received from phpBB forum ' . $forumId); + $bridge = new Bridge(); $to = $bridge->getLists($forumId); @@ -205,6 +210,8 @@ EOF; if (PEAR::isError($err)) { throw new Exception('Mail::send error: ' . $err->toString()); } + + $logger->info($postId . ' sent to ' . $to . ' as ' . $messageId); } catch (Exception $e) { # Bridging failed, unregister message. -- cgit v1.2.3