--- trunk2/lib/WebPAC/jsFind.pm 2004/09/14 21:00:15 444 +++ trunk2/lib/WebPAC/jsFind.pm 2004/09/14 21:02:28 445 @@ -145,6 +145,12 @@ This method will create directories if needed and store tree xml files for all indexes. +Turning debugging for this function by inserting + + log4perl.logger.WebPAC.jsFind.close=DEBUG + +into C will also result in creation of GraphViz C<.dot> files +for each index in current directory. =cut @@ -159,6 +165,16 @@ $log->debug("saving index '$index_name' xml files to '$path'"); $self->tree($index_name)->to_jsfind($path,'ISO-8859-2','UTF-8'); + + if ($log->is_debug()) { + my $dot_file = $index_name.".dot"; + + $log->debug("saving graphviz file for '$index_name' to '$dot_file'"); + + open(DOT, ">", $dot_file) || $log->logdie("can't open '$dot_file': $!"); + print DOT $self->tree($index_name)->to_dot; + close(DOT); + } } }