Documentation ¶
Overview ¶
Copyright 2013 bee authors
Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Black(message string) string
- func BlackBold(message string) string
- func Blue(message string) string
- func BlueBold(message string) string
- func Bold(message string) string
- func Cyan(message string) string
- func CyanBold(message string) string
- func EndLine() string
- func Gray(message string) string
- func GrayBold(message string) string
- func Green(message string) string
- func GreenBold(message string) string
- func IsDebugEnabled() bool
- func Magenta(message string) string
- func MagentaBold(message string) string
- func MustCheck(err error)
- func NewColorWriter(w io.Writer) io.Writer
- func NewModeColorWriter(w io.Writer, mode outputMode) io.Writer
- func Now(layout string) string
- func Red(message string) string
- func RedBold(message string) string
- func White(message string) string
- func WhiteBold(message string) string
- func Yellow(message string) string
- func YellowBold(message string) string
- type EgoLogger
- func (l *EgoLogger) Critical(message string)
- func (l *EgoLogger) Criticalf(message string, vars ...interface{})
- func (l *EgoLogger) Debug(message string, file string, line int)
- func (l *EgoLogger) Debugf(message string, file string, line int, vars ...interface{})
- func (l *EgoLogger) Error(message string)
- func (l *EgoLogger) Errorf(message string, vars ...interface{})
- func (l *EgoLogger) Fatal(message string)
- func (l *EgoLogger) Fatalf(message string, vars ...interface{})
- func (l *EgoLogger) Hint(message string)
- func (l *EgoLogger) Hintf(message string, vars ...interface{})
- func (l *EgoLogger) Info(message string)
- func (l *EgoLogger) Infof(message string, vars ...interface{})
- func (l *EgoLogger) SetOutput(w io.Writer)
- func (l *EgoLogger) Success(message string)
- func (l *EgoLogger) Successf(message string, vars ...interface{})
- func (l *EgoLogger) Warn(message string)
- func (l *EgoLogger) Warnf(message string, vars ...interface{})
- type LogRecord
Constants ¶
const ( DiscardNonColorEscSeq outputMode OutputNonColorEscSeq )
DiscardNonColorEscSeq supports the divided color escape sequence. But non-color escape sequence is not output. Please use the OutputNonColorEscSeq If you want to output a non-color escape sequences such as ncurses. However, it does not support the divided color escape sequence.
Variables ¶
This section is empty.
Functions ¶
func IsDebugEnabled ¶
func IsDebugEnabled() bool
IsDebugEnabled checks if DEBUG_ENABLED is set or not
func MagentaBold ¶
MagentaBold returns a magenta bold string
func NewColorWriter ¶
NewColorWriter creates and initializes a new ansiColorWriter using io.Writer w as its initial contents. In the console of Windows, which change the foreground and background colors of the text by the escape sequence. In the console of other systems, which writes to w all text.
func NewModeColorWriter ¶
NewModeColorWriter create and initializes a new ansiColorWriter by specifying the outputMode.
Types ¶
type EgoLogger ¶
type EgoLogger struct {
// contains filtered or unexported fields
}
EgoLogger logs logging records to the specified io.Writer
func GetEgoLogger ¶
GetEgoLogger initializes the logger instance with a NewColorWriter output and returns a singleton