<commit_before>package static

import (
	"errors"
	"strings"
	"time"

	"github.com/containous/flaeg/parse"
	"github.com/containous/traefik/old/provider/boltdb"
	"github.com/containous/traefik/old/provider/consul"
	"github.com/containous/traefik/old/provider/consulcatalog"
	"github.com/containous/traefik/old/provider/dynamodb"
	"github.com/containous/traefik/old/provider/ecs"
	"github.com/containous/traefik/old/provider/etcd"
	"github.com/containous/traefik/old/provider/eureka"
	"github.com/containous/traefik/old/provider/mesos"
	"github.com/containous/traefik/old/provider/rancher"
	"github.com/containous/traefik/old/provider/zk"
	"github.com/containous/traefik/pkg/log"
	"github.com/containous/traefik/pkg/ping"
	acmeprovider "github.com/containous/traefik/pkg/provider/acme"
	"github.com/containous/traefik/pkg/provider/docker"
	"github.com/containous/traefik/pkg/provider/file"
	"github.com/containous/traefik/pkg/provider/kubernetes/crd"
	"github.com/containous/traefik/pkg/provider/kubernetes/ingress"
	"github.com/containous/traefik/pkg/provider/marathon"
	"github.com/containous/traefik/pkg/provider/rest"
	"github.com/containous/traefik/pkg/tls"
	"github.com/containous/traefik/pkg/tracing/datadog"
	"github.com/containous/traefik/pkg/tracing/instana"
	"github.com/containous/traefik/pkg/tracing/jaeger"
	"github.com/containous/traefik/pkg/tracing/zipkin"
	"github.com/containous/traefik/pkg/types"
	assetfs "github.com/elazarl/go-bindata-assetfs"
	"github.com/go-acme/lego/challenge/dns01"
	jaegercli "github.com/uber/jaeger-client-go"
)

const (
	// DefaultInternalEntryPointName the name of the default internal entry point
	DefaultInternalEntryPointName = "traefik"

	// DefaultGraceTimeout controls how long Traefik serves pending requests
	// prior to shutting down.
	DefaultGraceTimeout = 10 * time.Second

	// DefaultIdleTimeout before closing an idle connection.
	DefaultIdleTimeout = 180 * time.Second

	// DefaultAcmeCAServer is the default ACME API endpoint
	DefaultAcmeCAServer = "https://acme-v02.api.letsencrypt.org/directory"
)

// Configuration is the static configuration
type Configuration struct {
	Global *Global `description:"Global configuration options" export:"true"`

	ServersTransport *ServersTransport `description:"Servers default transport" export:"true"`
	EntryPoints      EntryPoints       `description:"Entrypoints definition using format: --entryPoints='Name:http Address::8000 Redirect.EntryPoint:https' --entryPoints='Name:https Address::4442 TLS:tests/traefik.crt,tests/traefik.key;prod/traefik.crt,prod/traefik.key'" export:"true"`
	Providers        *Providers        `description:"Providers configuration" export:"true"`

	API     *API           `description:"Enable api/dashboard" export:"true"`
	Metrics *types.Metrics `description:"Enable a metrics exporter" export:"true"`
	Ping    *ping.Handler  `description:"Enable ping" export:"true"`
	// Rest    *rest.Provider `description:"Enable Rest backend with default settings" export:"true"`

	Log       *types.TraefikLog
	AccessLog *types.AccessLog `description:"Access log settings" export:"true"`
	Tracing   *Tracing         `description:"OpenTracing configuration" export:"true"`

	HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening" export:"true"`

	ACME *acmeprovider.Configuration `description:"Enable ACME (Let's Encrypt): automatic SSL" export:"true"`
}

// Global holds the global configuration.
type Global struct {
	Debug              bool  `short:"d" description:"Enable debug mode" export:"true"`
	CheckNewVersion    bool  `description:"Periodically check if a new version has been released" export:"true"`
	SendAnonymousUsage *bool `description:"send periodically anonymous usage statistics" export:"true"`
}

// ServersTransport options to configure communication between Traefik and the servers
type ServersTransport struct {
	InsecureSkipVerify  bool                `description:"Disable SSL certificate verification" export:"true"`
	RootCAs             tls.FilesOrContents `description:"Add cert file for self-signed certificate"`
	MaxIdleConnsPerHost int                 `description:"If non-zero, controls the maximum idle (keep-alive) to keep per-host.  If zero, DefaultMaxIdleConnsPerHost is used" export:"true"`
	ForwardingTimeouts  *ForwardingTimeouts `description:"Timeouts for requests forwarded to the backend servers" export:"true"`
}

// API holds the API configuration
type API struct {
	EntryPoint      string            `description:"EntryPoint" export:"true"`
	Dashboard       bool              `description:"Activate dashboard" export:"true"`
	Statistics      *types.Statistics `description:"Enable more detailed statistics" export:"true"`<commit_msg>Allow user to configure traefik log<commit_after>package static

import (
	"errors"
	"strings"
	"time"

	"github.com/containous/flaeg/parse"
	"github.com/containous/traefik/old/provider/boltdb"
	"github.com/containous/traefik/old/provider/consul"
	"github.com/containous/traefik/old/provider/consulcatalog"
	"github.com/containous/traefik/old/provider/dynamodb"
	"github.com/containous/traefik/old/provider/ecs"
	"github.com/containous/traefik/old/provider/etcd"
	"github.com/containous/traefik/old/provider/eureka"
	"github.com/containous/traefik/old/provider/mesos"
	"github.com/containous/traefik/old/provider/rancher"
	"github.com/containous/traefik/old/provider/zk"
	"github.com/containous/traefik/pkg/log"
	"github.com/containous/traefik/pkg/ping"
	acmeprovider "github.com/containous/traefik/pkg/provider/acme"
	"github.com/containous/traefik/pkg/provider/docker"
	"github.com/containous/traefik/pkg/provider/file"
	"github.com/containous/traefik/pkg/provider/kubernetes/crd"
	"github.com/containous/traefik/pkg/provider/kubernetes/ingress"
	"github.com/containous/traefik/pkg/provider/marathon"
	"github.com/containous/traefik/pkg/provider/rest"
	"github.com/containous/traefik/pkg/tls"
	"github.com/containous/traefik/pkg/tracing/datadog"
	"github.com/containous/traefik/pkg/tracing/instana"
	"github.com/containous/traefik/pkg/tracing/jaeger"
	"github.com/containous/traefik/pkg/tracing/zipkin"
	"github.com/containous/traefik/pkg/types"
	assetfs "github.com/elazarl/go-bindata-assetfs"
	"github.com/go-acme/lego/challenge/dns01"
	jaegercli "github.com/uber/jaeger-client-go"
)

const (
	// DefaultInternalEntryPointName the name of the default internal entry point
	DefaultInternalEntryPointName = "traefik"

	// DefaultGraceTimeout controls how long Traefik serves pending requests
	// prior to shutting down.
	DefaultGraceTimeout = 10 * time.Second

	// DefaultIdleTimeout before closing an idle connection.
	DefaultIdleTimeout = 180 * time.Second

	// DefaultAcmeCAServer is the default ACME API endpoint
	DefaultAcmeCAServer = "https://acme-v02.api.letsencrypt.org/directory"
)

// Configuration is the static configuration
type Configuration struct {
	Global *Global `description:"Global configuration options" export:"true"`

	ServersTransport *ServersTransport `description:"Servers default transport" export:"true"`
	EntryPoints      EntryPoints       `description:"Entrypoints definition using format: --entryPoints='Name:http Address::8000 Redirect.EntryPoint:https' --entryPoints='Name:https Address::4442 TLS:tests/traefik.crt,tests/traefik.key;prod/traefik.crt,prod/traefik.key'" export:"true"`
	Providers        *Providers        `description:"Providers configuration" export:"true"`

	API     *API           `description:"Enable api/dashboard" export:"true"`
	Metrics *types.Metrics `description:"Enable a metrics exporter" export:"true"`
	Ping    *ping.Handler  `description:"Enable ping" export:"true"`
	// Rest    *rest.Provider `description:"Enable Rest backend with default settings" export:"true"`

	Log       *types.TraefikLog `description:"Traefik log settings" export:"true"`
	AccessLog *types.AccessLog  `description:"Access log settings" export:"true"`
	Tracing   *Tracing          `description:"OpenTracing configuration" export:"true"`

	HostResolver *types.HostResolverConfig `description:"Enable CNAME Flattening" export:"true"`

	ACME *acmeprovider.Configuration `description:"Enable ACME (Let's Encrypt): automatic SSL" export:"true"`
}

// Global holds the global configuration.
type Global struct {
	Debug              bool  `short:"d" description:"Enable debug mode" export:"true"`
	CheckNewVersion    bool  `description:"Periodically check if a new version has been released" export:"true"`
	SendAnonymousUsage *bool `description:"send periodically anonymous usage statistics" export:"true"`
}

// ServersTransport options to configure communication between Traefik and the servers
type ServersTransport struct {
	InsecureSkipVerify  bool                `description:"Disable SSL certificate verification" export:"true"`
	RootCAs             tls.FilesOrContents `description:"Add cert file for self-signed certificate"`
	MaxIdleConnsPerHost int                 `description:"If non-zero, controls the maximum idle (keep-alive) to keep per-host.  If zero, DefaultMaxIdleConnsPerHost is used" export:"true"`
	ForwardingTimeouts  *ForwardingTimeouts `description:"Timeouts for requests forwarded to the backend servers" export:"true"`
}

// API holds the API configuration
type API struct {
	EntryPoint      string            `description:"EntryPoint" export:"true"`
	Dashboard       bool              `description:"Activate dashboard" export:"true"`
	Statistics      *types.Statistics `description:"Enable more detailed statistics" export:"true"`
{'fraction_non_alphanumeric': 0.11317976228042495, 'fraction_numerical': 0.003576312191017145, 'mean_word_length': 4.972361809045226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '954095', 'n_tokens_mistral': 3018, 'n_tokens_neox': 2925, 'n_words': 590}