<commit_before>/*
Copyright (c) 2012 <NAME>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
MA  02110-1301, USA.
*/

package util

import (
         "os"
         "log"
         "fmt"
         "time"
       )

// The *log.Logger used by util.Log(). By default it simply prints logged
// messages to Stderr without adding any kind of prefix, time, etc.
var Logger = log.New(os.Stderr, "", 0)

// Outputs a message to util.Logger formatted as with fmt.Printf().
// The level parameter assigns an importance to the message, where 0
// is the most important (such as fatal errors) and increasing numbers
// mark messages of lesser importance. The idea is that a message of 
// level N should only be printed when the program was started with
// N -v (i.e. verbose) switches. So level 0 marks messages that should
// always be logged. Level 1 are informative messages the user may
// not care about. Level 2 and above are typically used for debug
// messages, where level 2 are debug messages that may help the user
// pinpoint a problem and level 3 are debug messages only useful to
// developers. There is usually no need for higher levels.
func Log(level int, format string, args ...interface{}) {<commit_msg>command line args -v, -vv and --test=...<commit_after>/*
Copyright (c) 2012 <NAME>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
MA  02110-1301, USA.
*/

package util

import (
         "os"
         "log"
         "fmt"
         "time"
       )

// The *log.Logger used by util.Log(). By default it simply prints logged
// messages to Stderr without adding any kind of prefix, time, etc.
var Logger = log.New(os.Stderr, "", 0)

// Only messages with a level <= this number will be printed.
var LogLevel = 0

// Outputs a message to util.Logger formatted as with fmt.Printf().
// The level parameter assigns an importance to the message, where 0
// is the most important (such as fatal errors) and increasing numbers
// mark messages of lesser importance. The idea is that a message of 
// level N should only be printed when the program was started with
// N -v (i.e. verbose) switches. So level 0 marks messages that should
// always be logged. Level 1 are informative messages the user may
// not care about. Level 2 and above are typically used for debug
// messages, where level 2 are debug messages that may help the user
// pinpoint a problem and level 3 are debug messages only useful to
// developers. There is usually no need for higher levels.
func Log(level int, format string, args ...interface{}) {
  if (level > LogLevel) { return }
{'fraction_non_alphanumeric': 0.06708927628103539, 'fraction_numerical': 0.012414157422081353, 'mean_word_length': 3.3983739837398375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '282376', 'n_tokens_mistral': 995, 'n_tokens_neox': 937, 'n_words': 585}