<commit_before>package cmd

import (
	"os"

	"github.com/juju/cmd"
	"github.com/juju/loggo"

	"github.com/juju/juju/juju/osenv"
	"github.com/juju/juju/version"
)

func init() {
	// Ignore any parse errors that the configuration may have.
	// This is a developer feature, and if it isn't working, then it
	// is probably due to the configuration being wrong.
	loggo.ConfigureLoggers(os.Getenv(osenv.JujuStartupLoggingConfigEnvKey))
}

var logger = loggo.GetLogger("juju.cmd")

// NewSuperCommand is like cmd.NewSuperCommand but
// it adds juju-specific functionality:
// - The default logging configuration is taken from the environment;
// - The version is configured to the current juju version;<commit_msg>Write out parse errors for the initial logging config.<commit_after>package cmd

import (
	"fmt"
	"os"

	"github.com/juju/cmd"
	"github.com/juju/loggo"

	"github.com/juju/juju/juju/osenv"
	"github.com/juju/juju/version"
)

func init() {
	// If the environment key is empty, ConfigureLoggers returns nil and does
	// nothing.
	err := loggo.ConfigureLoggers(os.Getenv(osenv.JujuStartupLoggingConfigEnvKey))
	if err != nil {
		fmt.Fprintf(os.Stderr, "ERROR parsing %s: %s\n\n", osenv.JujuStartupLoggingConfigEnvKey, err)
	}
}

var logger = loggo.GetLogger("juju.cmd")

// NewSuperCommand is like cmd.NewSuperCommand but
// it adds juju-specific functionality:
// - The default logging configuration is taken from the environment;
// - The version is configured to the current juju version;
{'fraction_non_alphanumeric': 0.11178045515394913, 'fraction_numerical': 0.0, 'mean_word_length': 4.155172413793103, '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': '1634832', 'n_tokens_mistral': 525, 'n_tokens_neox': 497, 'n_words': 142}