summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2012-12-14 15:20:06 +0000
committerdakkar <dakkar@thenautilus.net>2012-12-14 15:20:06 +0000
commit261240c20b86254136aa80a6baa58e7b3f8692a8 (patch)
tree0027071c349e288078bc06d03db3df185f010d56 /lib
parentmore de-undef (diff)
downloadfeeder-261240c20b86254136aa80a6baa58e7b3f8692a8.tar.gz
feeder-261240c20b86254136aa80a6baa58e7b3f8692a8.tar.bz2
feeder-261240c20b86254136aa80a6baa58e7b3f8692a8.zip
logging uris
Diffstat (limited to 'lib')
-rw-r--r--lib/Feed.pm8
-rw-r--r--lib/Feed/Utils.pm2
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/Feed.pm b/lib/Feed.pm
index 26cc26e..118e882 100644
--- a/lib/Feed.pm
+++ b/lib/Feed.pm
@@ -51,6 +51,14 @@ has title => (
builder => 'extract_title',
);
+sub BUILD {
+ my ($self) = @_;
+
+ Log::Log4perl::MDC->put( uri => $self->uri->as_string );
+
+ return;
+}
+
sub extract_title {
my ($self) = @_;
diff --git a/lib/Feed/Utils.pm b/lib/Feed/Utils.pm
index 60ea383..48a4dc9 100644
--- a/lib/Feed/Utils.pm
+++ b/lib/Feed/Utils.pm
@@ -69,6 +69,8 @@ sub feeds_from_opml {
} catch { warn $_; return };
return unless $opml;
+ Log::Log4perl::MDC->put( opml => "$opml_source" );
+
my @exclude = @{$opts->{exclude} // []};
for my $feed_node ($opml->findnodes(q{/opml/body/outline[@xmlUrl != '']})) {