Skip to content

Commit

Permalink
Remove GetLoggerName
Browse files Browse the repository at this point in the history
  • Loading branch information
brikis98 committed May 26, 2017
1 parent 5100aa1 commit 88f7193
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package logging

import (
"github.com/Sirupsen/logrus"
"fmt"
"sync"
)

Expand Down Expand Up @@ -38,13 +37,3 @@ func SetGlobalLogLevel(level logrus.Level) {

globalLogLevel = level
}

// Return the name of the given logger as set by the GetLogger function or an empty string if this logger has no name
func GetLoggerName(logger *logrus.Entry) string {
name, hasName := logger.Data[loggerNameField]
if hasName {
return fmt.Sprintf("%v", name)
} else {
return ""
}
}
5 changes: 0 additions & 5 deletions shell/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ import (
"os"
"github.com/gruntwork-io/gruntwork-cli/errors"
"strings"
"github.com/gruntwork-io/gruntwork-cli/logging"
"github.com/fatih/color"
)

var BRIGHT_GREEN = color.New(color.FgHiGreen, color.Bold)

// Prompt the user for text in the CLI. Returns the text entered by the user.
func PromptUserForInput(prompt string, options *ShellOptions) (string, error) {
loggerName := logging.GetLoggerName(options.Logger)
if loggerName != "" {
prompt = fmt.Sprintf("%s %s", loggerName, prompt)
}
BRIGHT_GREEN.Print(prompt)

if options.NonInteractive {
Expand Down

0 comments on commit 88f7193

Please sign in to comment.