Report: new functions PutBrownWithPadRawCase() and PutVar()
This commit is contained in:
parent
67abfa9dae
commit
8a0ef4c3ea
@ -41,6 +41,11 @@ func (rep *Report) Log() logger.VerboseLogger {
|
|||||||
return rep.log
|
return rep.log
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rep *Report) PutBrownWithPadRawCase(name string, value any, fieldSize int) {
|
||||||
|
name = utils.PadStringRight(name, rep.pad, fieldSize, rep.valueTempl)
|
||||||
|
rep.log.VerboseBrownf(name, value)
|
||||||
|
}
|
||||||
|
|
||||||
func (rep *Report) PutBrownWithPad(name string, value any, fieldSize int) {
|
func (rep *Report) PutBrownWithPad(name string, value any, fieldSize int) {
|
||||||
name = strings.Title(name)
|
name = strings.Title(name)
|
||||||
name = utils.PadStringRight(name, rep.pad, fieldSize, rep.valueTempl)
|
name = utils.PadStringRight(name, rep.pad, fieldSize, rep.valueTempl)
|
||||||
@ -57,6 +62,10 @@ func (rep *Report) PutParam(name string, value any) {
|
|||||||
rep.PutBrownWithPad(name, value, rep.nameFieldSize)
|
rep.PutBrownWithPad(name, value, rep.nameFieldSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rep *Report) PutVar(name string, value any) {
|
||||||
|
rep.PutBrownWithPadRawCase(name, value, rep.nameFieldSize)
|
||||||
|
}
|
||||||
|
|
||||||
func (rep *Report) PutParamWithError(name string, err error, value any) {
|
func (rep *Report) PutParamWithError(name string, err error, value any) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tty, _ := rep.log.GetProperty(CONSOLE_LOG_TTY).(*utils.TTYContext)
|
tty, _ := rep.log.GetProperty(CONSOLE_LOG_TTY).(*utils.TTYContext)
|
||||||
|
Loading…
Reference in New Issue
Block a user