<commit_before>package logging

import (
	"errors"
	"fmt"
	"github.com/qb0C80aE/clay/logging"
)

var utility = &Utility{}

// Utility handles logging operation
type Utility struct {
}

// GetUtility returns the instance of utility
func GetUtility() *Utility {
	return utility
}

// Debug outputs debug message
func (receiver *Utility) Debug(log interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Debug(message)
	return nil
}

// Debugf outputs formatted debug message
func (receiver *Utility) Debugf(log interface{}, parameters []interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Debugf(message, parameters...)
	return nil
}

// Info outputs information message
func (receiver *Utility) Info(log interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Info(message)
	return nil
}

// Infof outputs formatted information message
func (receiver *Utility) Infof(log interface{}, parameters []interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Infof(message, parameters...)
	return nil
}

// Warn outputs warning message
func (receiver *Utility) Warn(log interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Warn(message)
	return nil
}

// Warnf outputs formatted warning message
func (receiver *Utility) Warnf(log interface{}, parameters []interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Warnf(message, parameters...)
	return nil
}

// Critical outputs critical message
func (receiver *Utility) Critical(log interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Critical(message)
	return nil
}

// Criticalf outputs formatted critial message
func (receiver *Utility) Criticalf(log interface{}, parameters []interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	logging.Logger().Criticalf(message, parameters...)
	return nil
}

// Panic throws panic with message
func (receiver *Utility) Panic(log interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	panic(message)
}

// Panicf throws panic with formatted message
func (receiver *Utility) Panicf(log interface{}, parameters []interface{}) error {
	message, ok := log.(string)
	if !ok {
		return errors.New("log is not a string")
	}

	message = fmt.Sprintf(message, parameters...)
	panic(message)
}
<commit_msg>Fix logging parameters in order to accept any objects, and restrict the first parameter to a string in case of formatting<commit_after>package logging

import (
	"fmt"
	"github.com/qb0C80aE/clay/logging"
)

var utility = &Utility{}

// Utility handles logging operation
type Utility struct {
}

// GetUtility returns the instance of utility
func GetUtility() *Utility {
	return utility
}

// Debug outputs debug message
func (receiver *Utility) Debug(log interface{}) interface{} {
	logging.Logger().Debug(log)
	return nil
}

// Debugf outputs formatted debug message
func (receiver *Utility) Debugf(format string, parameters []interface{}) interface{} {
	logging.Logger().Debugf(format, parameters...)
	return nil
}

// Info outputs information message
func (receiver *Utility) Info(log interface{}) error {
	logging.Logger().Info(log)
	return nil
}

// Infof outputs formatted information message
func (receiver *Utility) Infof(format string, parameters []interface{}) interface{} {
	logging.Logger().Infof(format, parameters...)
	return nil
}

// Warn outputs warning message
func (receiver *Utility) Warn(log interface{}) error {
	logging.Logger().Warn(log)
	return nil
}

// Warnf outputs formatted warning message
func (receiver *Utility) Warnf(format string, parameters []interface{}) interface{} {
	logging.Logger().Warnf(format, parameters...)
	return nil
}

// Critical outputs critical message
func (receiver *Utility) Critical(log interface{}) error {
	logging.Logger().Critical(log)
	return nil
}

// Criticalf outputs formatted critial message
func (receiver *Utility) Criticalf(format string, parameters []interface{}) interface{} {
	logging.Logger().Criticalf(format, parameters...)
	return nil
}

// Panic throws panic with message
func (receiver *Utility) Panic(log interface{}) error {
	panic(log)
}

// Panicf throws panic with formatted message
func (receiver *Utility) Panicf(format string, parameters []interface{}) interface{} {
	message := fmt.Sprintf(format, parameters...)
	panic(message)
}

{'fraction_non_alphanumeric': 0.13010842368640535, 'fraction_numerical': 0.0012510425354462051, 'mean_word_length': 4.532871972318339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6925007', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1428, 'n_words': 483}