Warning in log when a Slack channel import fails. (#4262)

Previously it just wrote to the summary, and as a debug level message in
the log, so if you had the log level set to warn, you might never find
out that importing a channel failed.
This commit is contained in:
George Goldberg 2016-10-31 13:02:54 +00:00 committed by Christopher Speller
parent 316b155a42
commit 54277eae28
2 changed files with 3 additions and 3 deletions

View file

@ -312,7 +312,7 @@ func SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[str
if mChannel == nil {
// Maybe it already exists?
if result := <-Srv.Store.Channel().GetByName(teamId, sChannel.Name); result.Err != nil {
l4g.Debug(utils.T("api.slackimport.slack_add_channels.import_failed.debug"), newChannel.DisplayName)
l4g.Warn(utils.T("api.slackimport.slack_add_channels.import_failed.warn"), newChannel.DisplayName)
log.WriteString(utils.T("api.slackimport.slack_add_channels.import_failed", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
continue
} else {

View file

@ -1532,8 +1532,8 @@
"translation": "Failed to import: {{.DisplayName}}\r\n"
},
{
"id": "api.slackimport.slack_add_channels.import_failed.debug",
"translation": "Failed to import: %s"
"id": "api.slackimport.slack_add_channels.import_failed.warn",
"translation": "Slack Importer: Failed to import channel: %s"
},
{
"id": "api.slackimport.slack_add_channels.merge",