本文整理汇总了Golang中github.com/burke/zeus/go/shinylog.Red函数的典型用法代码示例。如果您正苦于以下问题:Golang Red函数的具体用法?Golang Red怎么用?Golang Red使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Red函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ErrorConfigCommandCouldntStart
func ErrorConfigCommandCouldntStart(output string) {
slog.Red("Failed to initialize application from {yellow}zeus.json{red}.")
if slog.Red("The json file is valid, but the {yellow}command{red} could not be started:") {
fmt.Println(output)
ExitNow(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:7,代码来源:errors.go
示例2: ErrorConfigCommandCrashed
func ErrorConfigCommandCrashed(output string) {
slog.Red("Failed to initialize application from {yellow}zeus.json{red}.")
if slog.Red("The json file is valid, but the {yellow}command{red} terminated with this output:") {
fmt.Println(output)
ExitNow(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:7,代码来源:errors.go
示例3: ErrorConfigCommandCrashed
func ErrorConfigCommandCrashed(output string) {
if !suppressErrors {
slog.Red("Failed to initialize application from " + yellow + "zeus.json" + red + ".")
slog.Red("The json file is valid, but the " + yellow + "command" + red + " terminated with this output:")
fmt.Println(output)
ExitNow(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:8,代码来源:errors.go
示例4: ErrorConfigCommandCouldntStart
func ErrorConfigCommandCouldntStart(output string) {
if !suppressErrors {
slog.Red("Failed to initialize application from " + yellow + "zeus.json" + red + ".")
slog.Red("The json file is valid, but the " + yellow + "command" + red + " could not be started:")
fmt.Println(output)
ExitNow(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:8,代码来源:errors.go
示例5: startWrapper
func startWrapper(filesChanged chan string) *exec.Cmd {
path := executablePath()
cmd := exec.Command(path[0], path[1:]...)
var err error
if watcherIn, err = cmd.StdinPipe(); err != nil {
terminate(err.Error())
}
if watcherOut, err = cmd.StdoutPipe(); err != nil {
terminate(err.Error())
}
if watcherErr, err = cmd.StderrPipe(); err != nil {
terminate(err.Error())
}
cmd.Start()
go func() {
buf := make([]byte, 2048)
for {
n, err := watcherOut.Read(buf)
if err != nil {
time.Sleep(500 * time.Millisecond)
slog.Red("Failed to read from FileSystem watcher process: " + err.Error())
}
message := strings.TrimSpace(string(buf[:n]))
files := strings.Split(message, "\n")
for _, file := range files {
filesChanged <- file
}
}
}()
go func() {
err := cmd.Wait()
// gross, but this is an easy way to work around the case where
// signal propagation hits the wrapper before the master disables logging
time.Sleep(100 * time.Millisecond)
terminate("The FS watcher process crashed: " + err.Error())
}()
return cmd
}
开发者ID:shalecraig,项目名称:zeus,代码行数:42,代码来源:filemonitor.go
示例6: Error
func Error(msg string) {
if slog.Red(msg) {
ExitNow(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:5,代码来源:errors.go
示例7: errorFailedReadFromWatcher
func errorFailedReadFromWatcher(err error) {
if !suppressErrors {
slog.Red("Failed to read from FileSystem watcher process: " + err.Error())
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:5,代码来源:errors.go
示例8: ErrorFileMonitorWrapperCrashed
func ErrorFileMonitorWrapperCrashed(err error) {
if !suppressErrors {
slog.Red("The FileSystem watcher process crashed: " + err.Error())
ExitNow(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:6,代码来源:errors.go
示例9: ErrorCantCreateListener
func ErrorCantCreateListener() {
if !suppressErrors {
slog.Red("It looks like Zeus is already running. If not, remove " + yellow + ".zeus.sock" + red + " and try again.")
ExitNow(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:6,代码来源:errors.go
示例10: errorUnableToAcceptSocketConnection
func errorUnableToAcceptSocketConnection() {
if !suppressErrors {
slog.Red("Unable to accept socket connection.")
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:5,代码来源:errors.go
示例11: ErrorConfigFileInvalidJson
func ErrorConfigFileInvalidJson() {
if !suppressErrors {
slog.Red("The config file " + yellow + "zeus.json" + red + " contains invalid JSON and could not be parsed.")
os.Exit(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:6,代码来源:errors.go
示例12: ErrorConfigFileInvalidFormat
func ErrorConfigFileInvalidFormat() {
if !suppressErrors {
slog.Red("The config file " + yellow + "zeus.json" + red + " is not in the correct format.")
os.Exit(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:6,代码来源:errors.go
示例13: ErrorConfigCommandCrashed
func ErrorConfigCommandCrashed(output string) {
ExitNow(1, func() {
slog.Red("Couldn't boot application. {yellow}command{red} terminated with this output:")
fmt.Println(output)
})
}
开发者ID:nevir,项目名称:zeus,代码行数:6,代码来源:zerror.go
示例14: ErrorConfigFileMissing
// The config file is loaded before any goroutines arything is done that requires cleanup,
// and our exitNow goroutine has not been spawned yet, so we will just explicitly exit
// in the json-related errors..
func ErrorConfigFileMissing() {
if !suppressErrors {
slog.Red("Required config file " + yellow + "zeus.json" + red + " not found in the current directory.")
os.Exit(1)
}
}
开发者ID:Epictetus,项目名称:zeus,代码行数:9,代码来源:errors.go
示例15: ErrorCantConnectToMaster
func ErrorCantConnectToMaster() {
slog.Red("Can't connect to master. Run {yellow}zeus start{red} first.\r")
os.Exit(1)
}
开发者ID:rschmukler,项目名称:zeus,代码行数:4,代码来源:errors.go
示例16: ErrorConfigCommandCouldntStart
func ErrorConfigCommandCouldntStart(msg, output string) {
ExitNow(1, func() {
slog.Red("Failed to initialize application from {yellow}zeus.json{red}.")
slog.Red("The json file is valid, but the {yellow}command{red} could not be started:\n\x1b[0m" + output)
})
}
开发者ID:nevir,项目名称:zeus,代码行数:6,代码来源:zerror.go
示例17: errorUnableToAcceptSocketConnection
func errorUnableToAcceptSocketConnection() {
slog.Red("Unable to accept socket connection.")
}
开发者ID:rschmukler,项目名称:zeus,代码行数:3,代码来源:errors.go
示例18: ErrorCantCreateListener
func ErrorCantCreateListener() {
if slog.Red("It looks like Zeus is already running. If not, remove {yellow}.zeus.sock{red} and try again.") {
ExitNow(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:5,代码来源:errors.go
示例19: ErrorConfigFileInvalidFormat
func ErrorConfigFileInvalidFormat() {
if slog.Red("The config file {yellow}zeus.json{red} is not in the correct format.") {
os.Exit(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:5,代码来源:errors.go
示例20: ErrorConfigFileInvalidJson
func ErrorConfigFileInvalidJson() {
if slog.Red("The config file {yellow}zeus.json{red} contains invalid JSON and could not be parsed.") {
os.Exit(1)
}
}
开发者ID:rschmukler,项目名称:zeus,代码行数:5,代码来源:errors.go
注:本文中的github.com/burke/zeus/go/shinylog.Red函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论