Skip to content

Commit

Permalink
Item10331: Make logs less noisy
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/MongoDBPlugin@11236 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Mar 27, 2011
1 parent 17c7266 commit 1884447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/Foswiki/Plugins/MongoDBPlugin/DB.pm
Expand Up @@ -57,7 +57,7 @@ sub query {
if MONITOR;

#debugging for upstream
print STDERR "----------------------------------------------------------------------------------\n";
print STDERR "----------------------------------------------------------------------------------\n" if DEBUG;
my $connection = $self->_connect();
my $database = $connection->get_database( $self->{database} );
#$database->run_command({"profile" => 2});
Expand All @@ -83,12 +83,12 @@ use Data::Dumper;
. $cursor->count
. " (long_count = ".Dumper($long_count).") "
. " _BUT_ has_next is "
. ( $cursor->has_next() ? 'true' : 'false' ) . "\n";
. ( $cursor->has_next() ? 'true' : 'false' ) . "\n" if DEBUG;

#more debugging
#print STDERR "get_collection(system.profile)".Dumper($database->get_collection("system.profile")->find->all)."\n";
#p$database->run_command({"profile" => 0});
print STDERR "----------------------------------------------------------------------------------\n";
print STDERR "----------------------------------------------------------------------------------\n" if DEBUG;

#end timer
my $endTime = [Time::HiRes::gettimeofday];
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Search/MongoDBInfoCache.pm
Expand Up @@ -50,7 +50,7 @@ sub numberOfTopics {
my $count = $this->{_cursor}->count(1);
#TODO: find out if th
if (($count == 0) and $this->{_cursor}->has_next()) {
print STDERR "ERROR: cursor count == $count (real_count = ".$this->{_cursor}->{real_count}."), but cursor->has_next is true\n";
print STDERR "ERROR: cursor count == $count (real_count = ".$this->{_cursor}->{real_count}."), but cursor->has_next is true\n" if DEBUG;
#work around a bug in MongoDB
#while ($this->{_cursor}->has_next()) {
# $this->{_cursor}->next();
Expand Down

0 comments on commit 1884447

Please sign in to comment.