• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Golang log.Info函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/limetext/lime-backend/lib/log.Info函数的典型用法代码示例。如果您正苦于以下问题:Golang Info函数的具体用法?Golang Info怎么用?Golang Info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Info函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: Init

func (e *Editor) Init() {
	log.Info("Initializing")
	e.SetClipboardFuncs(setClipboard, getClipboard)
	e.loadKeyBindings()
	e.loadSettings()
	OnInit.call()
}
开发者ID:yzq1979,项目名称:lime-backend,代码行数:7,代码来源:editor.go


示例2: 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:yzq1979,项目名称:lime-html,代码行数:8,代码来源:main.go


示例3: load

func (p *plugin) 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 := watcher.Watch(pkg.Name(), pkg); err != nil {
			log.Warn("Couldn't watch %s: %s", pkg.Name(), err)
		}
	}
}
开发者ID:modulexcite,项目名称:lime-backend,代码行数:10,代码来源:sublime_manual.go


示例4: 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:modulexcite,项目名称:lime-backend,代码行数:11,代码来源:sublime_manual.go


示例5: 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:sivaramanr,项目名称:lime-backend,代码行数:19,代码来源:commandhandler.go


示例6: Fix

func (fv *frontendView) Fix(obj qml.Object) {
	fv.qv = obj
	obj.On("destroyed", func() {
		if fv.qv == obj {
			fv.qv = nil
		}
	})

	if len(fv.FormattedLine) == 0 && fv.bv.Size() > 0 {
		fv.bufferChanged(0, fv.bv.Size())
		return
	}

	log.Info("Fix: %v  %v  %v", obj, len(fv.FormattedLine), fv.bv.Size())

	for i := range fv.FormattedLine {
		_ = i
		obj.Call("addLine")
	}
}
开发者ID:ricochet1k,项目名称:lime-qml,代码行数:20,代码来源:view.go


示例7: 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.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)
		}
	}
	p.files = files
}
开发者ID:sivaramanr,项目名称:lime-backend,代码行数:23,代码来源:plugin.go


示例8: WebsocketServer


//.........这里部分代码省略.........
		websocket.JSON.Send(ws, map[string]string{"type": "statusMessage", "msg": t.status_message})
	}

	// Send cursor position
	websocket.JSON.Send(ws, t.GetSelectionMessage(backend.GetEditor().ActiveWindow().ActiveView()))

	// Send editor content
	var buf bytes.Buffer
	t.render(bufio.NewWriter(&buf))
	websocket.Message.Send(ws, buf.Bytes())
	buf.Reset()

	var data map[string]interface{}
	var kp keys.KeyPress
	for {
		err := websocket.JSON.Receive(ws, &data)
		if err != nil {
			log.Error(err)
			return
		}
		//log.LogDebug("Received: %s", data)

		msgType := data["type"].(string)

		if msgType == "key" {
			kp.Alt = data["altKey"].(bool)
			kp.Ctrl = data["ctrlKey"].(bool)
			kp.Super = data["metaKey"].(bool)
			kp.Shift = data["shiftKey"].(bool)

			if keyName, ok := data["key"].(string); ok {
				if utf8.RuneCountInString(keyName) == 1 { // One char
					r, _ := utf8.DecodeRuneInString(keyName)
					kp.Key = keys.Key(int64(r))
				} else {
					// TODO: automatic lookup instead of this manual lookup
					// See https://github.com/limetext/lime/pull/421/files#r19269236
					keymap := map[string]keys.Key{
						"ArrowLeft":   keys.Left,
						"ArrowUp":     keys.Up,
						"ArrowRight":  keys.Right,
						"ArrowDown":   keys.Down,
						"Left":        keys.Left,
						"Up":          keys.Up,
						"Right":       keys.Right,
						"Down":        keys.Down,
						"Enter":       keys.Enter,
						"Escape":      keys.Escape,
						"Backspace":   keys.Backspace,
						"Delete":      keys.Delete,
						"Del":         keys.Delete, // Deprecated: some old browsers still use "Del" instead of "Delete"
						"KeypadEnter": keys.KeypadEnter,
						"F1":          keys.F1,
						"F2":          keys.F2,
						"F3":          keys.F3,
						"F4":          keys.F4,
						"F5":          keys.F5,
						"F6":          keys.F6,
						"F7":          keys.F7,
						"F8":          keys.F8,
						"F9":          keys.F9,
						"F10":         keys.F10,
						"F11":         keys.F11,
						"F12":         keys.F12,
						"Insert":      keys.Insert,
						"PageUp":      keys.PageUp,
						"PageDown":    keys.PageDown,
						"Home":        keys.Home,
						"End":         keys.End,
						"Break":       keys.Break,
					}

					if key, ok := keymap[keyName]; ok {
						kp.Key = key
					} else {
						log.Debug("Unknown key: %s", keyName)
						continue
					}
				}
			} else {
				v := int64(data["keyCode"].(float64))
				if !kp.Shift {
					v = int64(unicode.ToLower(rune(v)))
				}
				kp.Key = keys.Key(v)
				kp.Text = string(v)
			}

			backend.GetEditor().HandleInput(kp)
		} else if msgType == "command" {
			command := data["name"].(string)
			//args := data["args"].([]string) //TODO: add arguments support

			ed := backend.GetEditor()
			go ed.RunCommand(command, make(backend.Args))
		} else {
			log.Info("Unhandled message type: %s", msgType)
		}
	}
}
开发者ID:yzq1979,项目名称:lime-html,代码行数:101,代码来源:main.go


示例9: MessageDialog

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

	t.BroadcastData(map[string]interface{}{"type": "messageDialog", "msg": msg})
}
开发者ID:yzq1979,项目名称:lime-html,代码行数:5,代码来源:main.go


示例10: OkCancelDialog

// TODO(q): Actually show a dialog
func (t *tbfe) OkCancelDialog(msg, ok string) bool {
	log.Info(msg, ok)
	return false
}
开发者ID:yzq1979,项目名称:lime-termbox,代码行数:5,代码来源:main.go


示例11: MessageDialog

// TODO(q): Actually show a dialog
func (t *tbfe) MessageDialog(msg string) {
	log.Info(msg)
}
开发者ID:yzq1979,项目名称:lime-termbox,代码行数: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:yzq1979,项目名称:lime-backend,代码行数:6,代码来源:editor.go


示例13: MessageDialog

func (h *DummyFrontend) MessageDialog(msg string) { log.Info(msg) }
开发者ID:yzq1979,项目名称:lime-backend,代码行数:1,代码来源:editor.go


示例14: StatusMessage

func (h *DummyFrontend) StatusMessage(msg string) { log.Info(msg) }
开发者ID:yzq1979,项目名称:lime-backend,代码行数:1,代码来源:editor.go



注:本文中的github.com/limetext/lime-backend/lib/log.Info函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang backend.GetEditor函数代码示例发布时间:2022-05-23
下一篇:
Golang log.Errorf函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap