<commit_before>package command

import (
	"github.com/Pterodactyl/wings/api"
	"github.com/Pterodactyl/wings/config"
	"github.com/Pterodactyl/wings/constants"
	"github.com/Pterodactyl/wings/tools"
	log "github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)

// RootCommand is the root command of wings
var RootCommand = &cobra.Command{
	Use:   "wings",
	Short: "",
	Long:  "",
	Run:   run,
}

func init() {

}

// Execute registers the RootCommand
func Execute() {
	RootCommand.Execute()
}

func run(cmd *cobra.Command, args []string) {
	tools.InitLogging()
	log.Info("Loading configuration")
	if err := config.LoadConfiguration(""); err != nil {
		log.WithError(err).Fatal("Failed to find configuration file")
	}
	tools.ConfigureLogging()

	log.Info(`                     ____`)
	log.Info(`__ Pterodactyl _____/___/_______ _______ ______`)
	log.Info(`\_____\    \/\/    /   /       /  __   /   ___/`)
	log.Info(`   \___\          /   /   /   /  /_/  /___   /`)
	log.Info(`        \___/\___/___/___/___/___    /______/`)
	log.Info(`                            /_______/ v` + constants.Version)
	log.Info()

	log.Info("Configuration loaded successfully.")

	log.Info("Starting api webserver")<commit_msg>wings cmd: add config flag<commit_after>package command

import (
	"github.com/Pterodactyl/wings/api"
	"github.com/Pterodactyl/wings/config"
	"github.com/Pterodactyl/wings/constants"
	"github.com/Pterodactyl/wings/tools"
	log "github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)

// RootCommand is the root command of wings
var RootCommand = &cobra.Command{
	Use:   "wings",
	Short: "",
	Long:  "",
	Run:   run,
}

var configPath string

func init() {
	RootCommand.Flags().StringVarP(&configPath, "config", "c", "./config.json", "Allows to set the path of the configuration file.")
}

// Execute registers the RootCommand
func Execute() {
	RootCommand.Execute()
}

func run(cmd *cobra.Command, args []string) {
	tools.InitLogging()
	log.Info("Loading configuration")
	if err := config.LoadConfiguration(configPath); err != nil {
		log.WithError(err).Fatal("Failed to find configuration file")
	}
	tools.ConfigureLogging()

	log.Info(`                     ____`)
	log.Info(`__ Pterodactyl _____/___/_______ _______ ______`)
	log.Info(`\_____\    \/\/    /   /       /  __   /   ___/`)
	log.Info(`   \___\          /   /   /   /  /_/  /___   /`)
	log.Info(`        \___/\___/___/___/___/___    /______/`)
	log.Info(`                            /_______/ v` + constants.Version)
	log.Info()

	log.Info("Configuration loaded successfully.")

	log.Info("Starting api webserver")
{'fraction_non_alphanumeric': 0.15730337078651685, 'fraction_numerical': 0.0015497869043006587, 'mean_word_length': 2.7859237536656893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '178478', 'n_tokens_mistral': 956, 'n_tokens_neox': 934, 'n_words': 159}