mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
improved logging
This commit is contained in:
@@ -123,6 +123,7 @@ func (pc PluginChannels) Fetch() PluginPackages {
|
|||||||
|
|
||||||
// Fetch retrieves all available PluginPackages from the given channel
|
// Fetch retrieves all available PluginPackages from the given channel
|
||||||
func (pc PluginChannel) Fetch() PluginPackages {
|
func (pc PluginChannel) Fetch() PluginPackages {
|
||||||
|
messenger.AddLog(fmt.Sprintf("Fetching channel: %q", string(pc)))
|
||||||
resp, err := http.Get(string(pc))
|
resp, err := http.Get(string(pc))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
TermMessage("Failed to query plugin channel:\n", err)
|
TermMessage("Failed to query plugin channel:\n", err)
|
||||||
@@ -143,6 +144,7 @@ func (pc PluginChannel) Fetch() PluginPackages {
|
|||||||
|
|
||||||
// Fetch retrieves all available PluginPackages from the given repository
|
// Fetch retrieves all available PluginPackages from the given repository
|
||||||
func (pr PluginRepository) Fetch() PluginPackages {
|
func (pr PluginRepository) Fetch() PluginPackages {
|
||||||
|
messenger.AddLog(fmt.Sprintf("Fetching repository: %q", string(pr)))
|
||||||
resp, err := http.Get(string(pr))
|
resp, err := http.Get(string(pr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
TermMessage("Failed to query plugin repository:\n", err)
|
TermMessage("Failed to query plugin repository:\n", err)
|
||||||
@@ -474,6 +476,8 @@ func (versions PluginVersions) install() {
|
|||||||
}
|
}
|
||||||
if anyInstalled {
|
if anyInstalled {
|
||||||
messenger.Message("One or more plugins installed. Please restart micro.")
|
messenger.Message("One or more plugins installed. Please restart micro.")
|
||||||
|
} else {
|
||||||
|
messenger.AddLog("Nothing to install / update")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,6 +502,7 @@ func (pl PluginPackage) Install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func UpdatePlugins() {
|
func UpdatePlugins() {
|
||||||
|
messenger.AddLog("Checking for plugin updates")
|
||||||
microVersion := PluginVersions{
|
microVersion := PluginVersions{
|
||||||
newStaticPluginVersion(CorePluginName, Version),
|
newStaticPluginVersion(CorePluginName, Version),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user