<commit_before>package main

import (
	"flag"
	"fmt"

	"github.com/weaveworks/docker-plugin/plugin/driver"
	. "github.com/weaveworks/weave/common"
	"os"
)

var version = "(unreleased version)"

func main() {
	var (
		justVersion bool
		address     string
		nameserver  string
		debug       bool
	)

	flag.BoolVar(&justVersion, "version", false, "print version and exit")
	flag.BoolVar(&debug, "debug", false, "output debugging info to stderr")
	flag.StringVar(&address, "socket", "/usr/share/docker/plugins/weave.sock", "socket on which to listen")
	flag.StringVar(&nameserver, "nameserver", "", "nameserver to provide to containers")

	flag.Parse()

	if justVersion {
		fmt.Printf("weave plugin %s\n", version)
		os.Exit(0)
	}

	EnableDebugLogging(debug)

	var d driver.Driver
	d, err := driver.New(version)
	if err != nil {
		Log.Fatalf("unable to create driver: %s", err)
	}

	if nameserver != "" {
		if err := d.SetNameserver(nameserver); err != nil {
			Log.Fatalf("could not set nameserver: %s", err)
		}
	}

	if err := d.Listen(address); err != nil {
		Log.Fatal(err)
	}
}<commit_msg>Catch up with change made to weave/common/logging.go<commit_after>package main

import (
	"flag"
	"fmt"

	"github.com/weaveworks/docker-plugin/plugin/driver"
	. "github.com/weaveworks/weave/common"
	"os"
)

var version = "(unreleased version)"

func main() {
	var (
		justVersion bool
		address     string
		nameserver  string
		debug       bool
	)

	flag.BoolVar(&justVersion, "version", false, "print version and exit")
	flag.BoolVar(&debug, "debug", false, "output debugging info to stderr")
	flag.StringVar(&address, "socket", "/usr/share/docker/plugins/weave.sock", "socket on which to listen")
	flag.StringVar(&nameserver, "nameserver", "", "nameserver to provide to containers")

	flag.Parse()

	if justVersion {
		fmt.Printf("weave plugin %s\n", version)
		os.Exit(0)
	}

	if debug {
		SetLogLevel("debug")
	}

	var d driver.Driver
	d, err := driver.New(version)
	if err != nil {
		Log.Fatalf("unable to create driver: %s", err)
	}

	if nameserver != "" {
		if err := d.SetNameserver(nameserver); err != nil {
			Log.Fatalf("could not set nameserver: %s", err)
		}
	}

	if err := d.Listen(address); err != nil {
		Log.Fatal(err)
	}
}
{'fraction_non_alphanumeric': 0.15098566308243727, 'fraction_numerical': 0.0008960573476702509, 'mean_word_length': 3.843817787418655, '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': '4283196', 'n_tokens_mistral': 851, 'n_tokens_neox': 788, 'n_words': 200}