Пример #1
0
func NewLogged() *Logged {
	return &Logged{
		Loggers:       []log.Logger{log.Root()},
		DefaultFormat: "term",
		DefaultLevel:  "info",
		DefaultTarget: "stdout",
	}
}
Пример #2
0
import (
	"fmt"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"strings"
	"sync"
	"time"

	"github.com/flynn/flynn/Godeps/_workspace/src/github.com/codegangsta/cli"
	"github.com/flynn/flynn/Godeps/_workspace/src/github.com/inconshreveable/axiom"
	log "github.com/flynn/flynn/Godeps/_workspace/src/gopkg.in/inconshreveable/log15.v2"
)

var Log = log.Root()

const usage = `build Go installations with native stdlib packages

DESCRIPTION:
   Cross compiled Go binaries are not suitable for production applications
   because code in the standard library relies on Cgo for DNS resolution
   with the native resolver, access to system certificate roots, and parts of os/user.

   gonative is a simple tool which creates a build of Go that can cross compile
   to all platforms while still using the Cgo-enabled versions of the stdlib
   packages. It does this by downloading the binary distributions for each
   platform and copying their libraries into the proper places. It sets
   the correct access time so they don't get rebuilt. It also copies
   some auto-generated runtime files into the build as well. gonative does
   not modify any Go that you have installed and builds Go again in a separate