コード例 #1
0
ファイル: main.go プロジェクト: viovanov/bosh-agent
func newLogger() logger.Logger {
	log.SetOutput(os.Stdout)
	sysLog := log.New(os.Stdout, "", log.LstdFlags)
	logger := logger.New(logger.LevelDebug, sysLog, sysLog)
	return newSignalableLogger(logger)
}
コード例 #2
0
ファイル: listener_test.go プロジェクト: viovanov/bosh-agent
		logWriter    spec.CapturableWriter
		logger       boshlogger.Logger
		allowedNames []string
		port         int
		directorCert *tls.Certificate
		i            installer.Installer
		tmpDir       string
		tarballPath  string
	)

	BeforeEach(func() {
		var err error
		log.SetOutput(GinkgoWriter)
		logWriter = spec.NewCapturableWriter(GinkgoWriter)
		sysLog := log.New(logWriter, "", 0)
		logger = boshlogger.New(boshlogger.LevelDebug, sysLog, sysLog)
		directorCert = spec.CertFor("director")
		tmpDir, err = ioutil.TempDir("", "test-tmp")
		Expect(err).ToNot(HaveOccurred())
		installScript := fmt.Sprintf("#!/bin/bash\necho hiya > %s/install.log\n", tmpDir)
		tarballPath = spec.CreateTarball(installScript)
		allowedNames = []string{"*"}
		system := system.NewOsSystem()
		i = installer.New(system)
		port = spec.GetFreePort()
	})

	JustBeforeEach(func() {
		config, err := auth.NewSSLConfig(
			spec.FixtureFilename("certs/bootstrapper.crt"),
			spec.FixtureFilename("certs/bootstrapper.key"),
コード例 #3
0
ファイル: main.go プロジェクト: guoger/bosh-agent
func newLogger() logger.Logger {
	log.SetOutput(os.Stdout)
	sysLog := log.New(os.Stdout, "", log.LstdFlags)
	return logger.New(logger.LevelDebug, sysLog, sysLog)
}