當前位置: 首頁>>代碼示例>>Golang>>正文


Golang log.Info函數代碼示例

本文整理匯總了Golang中github.com/limetext/lime/backend/log.Info函數的典型用法代碼示例。如果您正苦於以下問題:Golang Info函數的具體用法?Golang Info怎麽用?Golang Info使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Info函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: OkCancelDialog

// TODO: wait for client response, return true/false
func (t *tbfe) OkCancelDialog(msg, ok string) bool {
	log.Info(msg, ok)

	t.BroadcastData(map[string]interface{}{"type": "okCancelDialog", "msg": msg, "ok": ok})

	return false
}
開發者ID:rokite,項目名稱:lime,代碼行數:8,代碼來源:main.go

示例2: Init

func (e *Editor) Init() {
	log.Info("Initializing")
	e.SetClipboardFuncs(setClipboard, getClipboard)
	e.loadKeyBindings()
	e.loadSettings()
	OnInit.call()
}
開發者ID:hanshenu,項目名稱:lime,代碼行數:7,代碼來源:editor.go

示例3: loadSetting

func (e *Editor) loadSetting(pkg *packages.Packet) {
	if err := pkg.Load(); err != nil {
		log.Error(err)
	} else {
		log.Info("Loaded %s", pkg.Name())
		e.Watch(pkg.Name(), pkg)
	}
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:8,代碼來源:editor.go

示例4: loadKeyBinding

func (e *Editor) loadKeyBinding(pkg *packages.Packet) {
	if err := pkg.Load(); err != nil {
		log.Error(err)
	} else {
		log.Info("Loaded %s", pkg.Name())
		e.Watch(pkg.Name(), pkg)
	}
	e.keyBindings.Merge(pkg.MarshalTo().(*keys.KeyBindings))
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:9,代碼來源:editor.go

示例5: load

func (e *Editor) load(pkg *packages.Packet) {
	if err := pkg.Load(); err != nil {
		log.Errorf("Failed to load packet %s: %s", pkg.Name(), err)
	} else {
		log.Info("Loaded %s", pkg.Name())
		if err := e.Watch(pkg.Name(), pkg); err != nil {
			log.Warn("Couldn't watch %s: %s", pkg.Name(), err)
		}
	}
}
開發者ID:hanshenu,項目名稱:lime,代碼行數:10,代碼來源:editor.go

示例6: sublime_Console

func sublime_Console(tu *py.Tuple, kwargs *py.Dict) (py.Object, error) {
	if tu.Size() != 1 {
		return nil, fmt.Errorf("Unexpected argument count: %d", tu.Size())
	}
	if i, err := tu.GetItem(0); err != nil {
		return nil, err
	} else {
		log.Info("Python sez: %s", i)
	}
	return toPython(nil)
}
開發者ID:hanshenu,項目名稱:lime,代碼行數:11,代碼來源:sublime_manual.go

示例7: TestGlobalLog

func TestGlobalLog(t *testing.T) {
	var wg sync.WaitGroup
	log.Global.Close()
	log.Global.AddFilter("globaltest", log.FINEST, testlogger(func(str string) {
		if str != "Testing: hello world" {
			t.Errorf("got: %s", str)
		}
		wg.Done()
	}))
	wg.Add(1)
	log.Info("Testing: %s %s", "hello", "world")
	wg.Wait()
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:13,代碼來源:logger_test.go

示例8: RunApplicationCommand

func (ch *commandHandler) RunApplicationCommand(name string, args Args) error {
	p := Prof.Enter("ac")
	defer p.Exit()
	if ch.log {
		log.Info("Running application command: %s %v", name, args)
	} else {
		log.Fine("Running application command: %s %v", name, args)
	}
	if c, ok := ch.ApplicationCommands[name].(ApplicationCommand); c != nil && ok {
		if err := ch.init(c, args); err != nil && ch.verbose {
			log.Debug("Command initialization failed: %s", err)
			return err
		} else if err := c.Run(); err != nil && ch.verbose {
			log.Debug("Command execution failed: %s", err)
			return err
		}
	}
	return nil
}
開發者ID:hanshenu,項目名稱:lime,代碼行數:19,代碼來源:commandhandler.go

示例9: Reload

// On plugin reload we will scan for plugin files
// and packets in plugin path
func (p *Plugin) Reload() {
	var files []os.FileInfo
	log.Info("Reloading plugin %s", p.Name())
	f, err := os.Open(p.path)
	if err != nil {
		log.Errorf("Couldn't open dir: %s", err)
		return
	}
	defer f.Close()
	fi, err := f.Readdir(-1)
	if err != nil {
		log.Errorf("Couldn't read dir: %s", err)
		return
	}
	for _, f := range fi {
		if p.suffix != "" && strings.HasSuffix(f.Name(), p.suffix) {
			files = append(files, f)
		}
	}
	p.files = files
}
開發者ID:hanshenu,項目名稱:lime,代碼行數:23,代碼來源:plugin.go

示例10: Reload

// On plugin reload we will scan for plugin files
// and packets in plugin path
func (p *Plugin) Reload() {
	var (
		files []os.FileInfo
		pckts Packets
	)
	log.Info("Reloading plugin %s", p.Name())
	f, err := os.Open(p.path)
	if err != nil {
		log.Error("Couldn't open dir: %s", err)
		return
	}
	defer f.Close()
	fi, err := f.Readdir(-1)
	if err != nil {
		log.Error("Couldn't read dir: %s", err)
		return
	}
	for _, f := range fi {
		if p.suffix != "" && strings.HasSuffix(f.Name(), p.suffix) {
			files = append(files, f)
			continue
		}
		s := filepath.Ext(f.Name())
		for _, t := range types {
			if !strings.Contains(s, t) {
				continue
			}
			var pckt *Packet
			if t == "keymap" {
				pckt = NewPacket(pt.Join(p.path, f.Name()), new(keys.KeyBindings))
			} else {
				// We don't have any settings hierarchy for plugins at this moment
				pckt = NewPacket(pt.Join(p.path, f.Name()), p.Settings())
			}
			pckts = append(pckts, pckt)
		}
	}
	p.files = files
	p.packets = pckts
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:42,代碼來源:plugin.go

示例11: MessageDialog

// TODO(q): Actually show a dialog
func (t *tbfe) MessageDialog(msg string) {
	log.Info(msg)
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:4,代碼來源:main.go

示例12: OkCancelDialog

func (h *DummyFrontend) OkCancelDialog(msg string, button string) bool {
	log.Info(msg)
	h.m.Lock()
	defer h.m.Unlock()
	return h.defaultAction
}
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:6,代碼來源:editor.go

示例13: MessageDialog

func (h *DummyFrontend) MessageDialog(msg string) { log.Info(msg) }
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:1,代碼來源:editor.go

示例14: StatusMessage

func (h *DummyFrontend) StatusMessage(msg string) { log.Info(msg) }
開發者ID:ericcapricorn,項目名稱:lime,代碼行數:1,代碼來源:editor.go

示例15: MessageDialog

func (t *tbfe) MessageDialog(msg string) {
	log.Info(msg)

	t.BroadcastData(map[string]interface{}{"type": "messageDialog", "msg": msg})
}
開發者ID:rokite,項目名稱:lime,代碼行數:5,代碼來源:main.go


注:本文中的github.com/limetext/lime/backend/log.Info函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。