mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-29 17:32:30 +00:00

* Fix liuqid notarization (#191) * Fix liuqid notarization - 2nd part (#193) * fixed missing unmarshaling * fixed message formatting issue * fixed config parsing issue (#194) * [util] Supply fees But only where we want to see the transaction succeed. The other ones we let in a broken state. * Added logger a logger struct to log with a TAG (#198) Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> Signed-off-by: Julian Strobl <jmastr@mailbox.org> Co-authored-by: Jürgen Eckel <eckelj@users.noreply.github.com>
30 lines
740 B
Go
30 lines
740 B
Go
package util
|
|
|
|
import sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
type AppLogger struct {
|
|
}
|
|
|
|
var globalApplicationLoggerTag string
|
|
|
|
func init() {
|
|
// Initialize the package-level variable
|
|
globalApplicationLoggerTag = "[app] "
|
|
}
|
|
|
|
func GetAppLogger() *AppLogger {
|
|
return &AppLogger{}
|
|
}
|
|
|
|
func (logger *AppLogger) Info(ctx sdk.Context, msg string, keyvals ...interface{}) {
|
|
ctx.Logger().Info(globalApplicationLoggerTag+msg, keyvals...)
|
|
}
|
|
|
|
func (logger *AppLogger) Debug(ctx sdk.Context, msg string, keyvals ...interface{}) {
|
|
ctx.Logger().Debug(globalApplicationLoggerTag+msg, keyvals...)
|
|
}
|
|
|
|
func (logger *AppLogger) Error(ctx sdk.Context, msg string, keyvals ...interface{}) {
|
|
ctx.Logger().Error(globalApplicationLoggerTag+msg, keyvals...)
|
|
}
|