summaryrefslogtreecommitdiff
path: root/src/forum_post_send.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-07-15 13:25:11 +0000
committeruckelman <uckelman@nomic.net>2010-07-15 13:25:11 +0000
commitca20fcce0798ebd6300722d5e9f7100551f47c99 (patch)
treee53c382f2994454d5d13ab7037709903ae1830a8 /src/forum_post_send.php
parent7d9bae3106d2e941e75930ab4e70b9f4117aed0d (diff)
Added logging.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6990 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/forum_post_send.php')
-rw-r--r--src/forum_post_send.php7
1 files changed, 7 insertions, 0 deletions
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 '<p>';
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.