lib/awestruct/extensions/sitemap.rb in awestruct-0.4.8 vs lib/awestruct/extensions/sitemap.rb in awestruct-0.5.0.cr
- old
+ new
@@ -72,10 +72,10 @@
page.lastmod = Time.parse( page.date ).strftime( "%Y-%m-%d" )
else
page.lastmod = date.strftime( "%Y-%m-%d" )
end
rescue Exception => e
- puts "[ERROR] Cannot parse date #{date.to_s}: #{e}"
+ $LOG.error "Cannot parse date #{date.to_s}: #{e}" if $LOG.error?
end
else
page.lastmod = Time.now.strftime( "%Y-%m-%d" )
end
end