Documentation ¶
Index ¶
- Variables
- func BackTickQuote(ss string) string
- func ChkEnv(envVar string) bool
- func Db2Printf(flag bool, format string, a ...interface{}) (n int, err error)
- func DbFpf(db bool, w io.Writer, format string, a ...interface{}) (n int, err error)
- func DbFprintf(dbflag string, w io.Writer, format string, a ...interface{}) (n int, err error)
- func DbPf(db bool, format string, a ...interface{}) (n int, err error)
- func DbPfb(db bool, format string, a ...interface{}) (n int, err error)
- func DbPfe(envVar string, format string, a ...interface{}) (n int, err error)
- func DbPrintf(dbflag string, format string, a ...interface{}) (n int, err error)
- func FILE(d ...int) string
- func FUNCNAME(d ...int) string
- func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
- func IAmAt(s ...string)
- func IAmAt2(s ...string)
- func InArray(s string, arr []string) int
- func InArrayInt(s int, arr []int) int
- func InArrayString(s string, arr []string) int
- func IsDbOn(dbflag string) bool
- func LF(d ...int) string
- func LF2(d ...int) (line int, file string)
- func LFj(d ...int) string
- func LINE(d ...int) string
- func LINEnf(d ...int) (int, string)
- func ParseBool(s string) (b bool)
- func Printf(format string, a ...interface{}) (n int, err error)
- func ProcessFormat(format string, a []interface{}) (rv string, params []interface{})
- func SVar(v interface{}) string
- func SVarI(v interface{}) string
- func SetDbFlag(f map[string]bool)
- func SetFlag(name, sValue string)
- func Sprintf(format string, a ...interface{}) (ss string)
- func StdErrPiped() bool
- func StdInPiped() bool
- func StdOutPiped() bool
- func TrIAmAt(s ...string)
- type LogData
- type LogDataIntermediate
- type LogSeverity
- type LogToFile
- func (lf *LogToFile) Depth(d int)
- func (lf *LogToFile) ErrorMessageFormat()
- func (lf *LogToFile) Message(s string, data ...interface{})
- func (lf *LogToFile) MessageData(s string, data ...interface{})
- func (lf *LogToFile) MessageQuery(s string, data ...interface{})
- func (lf *LogToFile) OutputDestination(FilePtr io.Writer, isTerminal bool)
- func (lf *LogToFile) OutputDestinationWeb()
- func (lf *LogToFile) Send()
- func (lf *LogToFile) Severity(x LogSeverity)
- func (lf *LogToFile) StatusCode(code int)
- func (lf *LogToFile) UserMessage(s string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
var ColorBlack string
Black
var ColorBlue string
Blue
var ColorBlueOnWhite string
var ColorCyan string
Cyan
var ColorGreen string
Green
var ColorGreenOnWhite string
var ColorMagenta string
Magenta
var ColorMagentaOnWhite string
var ColorRed string
Red
var ColorReset string
Reset to default color
var ColorTab map[string]string
var ColorWhiteOnBlue string
var ColorYellow string
Yellow
Functions ¶
func BackTickQuote ¶
func IAmAt ¶
func IAmAt(s ...string)
IAmAt print out the current Function,File,Line No and an optional set of strings.
func IAmAt2 ¶
func IAmAt2(s ...string)
IAmAt2 prints out the current Function,File,Line No and an optional set of strings - do this for 2 levels deep.
func InArrayInt ¶
Return 0..n if 'n' is in the array arr, else -1.
func InArrayString ¶
Return 0..n if 's' is in the array arr, else -1.
func LINE ¶
LINE Return the current line number as a string. Default parameter is 1, must be an integer That reflects the depth in the call stack. A value of 0 would be the LINE() function itself. If you supply more than one parameter, 2..n are ignored.
func ProcessFormat ¶
func SVarI ¶
func SVarI(v interface{}) string
SVarI return the JSON encoded version of the data with tab indentation.
func StdErrPiped ¶
func StdErrPiped() bool
StdErrPiped returns true if os.Stderr apears to be send to a pipe
func StdInPiped ¶
func StdInPiped() bool
StdErrPiped returns true if os.Stdin apears to be send to a pipe
func StdOutPiped ¶
func StdOutPiped() bool
StdErrPiped returns true if os.Stdout apears to be send to a pipe
Types ¶
type LogData ¶
type LogData interface { // Setup OutputDestination(FilePtr io.Writer, isTerminal bool) // Output destinations are collected StatusCode(code int) // 404 etc. ErrorMessageFormat() // Set an error message format, text/plain, html, application/json etc. // Message OutputDestinationWeb() // per call output destination. Severity(x LogSeverity) // Depth(d int) // Default to -1, for normal LF but can be set. MessageQuery(s string, data ...interface{}) // SQL query if applicable. MessageData(s string, data ...interface{}) // Bind variables Message(s string, data ...interface{}) // fmt.Printf format, followed by items, %! - set to secret for next item. UserMessage(s string, data ...interface{}) // fmt.Printf format, followed by items // Finalize Send() // Completed Log Message }
func NewLogDataFile ¶
type LogDataIntermediate ¶
type LogDataIntermediate struct {
LineNo int
}
type LogSeverity ¶
type LogSeverity int
type LogToFile ¶
func (*LogToFile) ErrorMessageFormat ¶
func (lf *LogToFile) ErrorMessageFormat()
func (*LogToFile) MessageData ¶
func (*LogToFile) MessageQuery ¶
func (*LogToFile) OutputDestination ¶
func (*LogToFile) Severity ¶
func (lf *LogToFile) Severity(x LogSeverity)