diff --git a/mlog/mlog.go b/mlog/mlog.go index a7f3ddd..1dad225 100644 --- a/mlog/mlog.go +++ b/mlog/mlog.go @@ -356,8 +356,15 @@ func (l *Logger) Error(ctx context.Context, descr string, err error) { l.Log(mkErrMsg(ctx, LevelError, descr, err)) } -// Fatal logs a LevelFatal message. A Fatal message automatically stops the -// process with an os.Exit(1) if the default MessageHandler is used. -func (l *Logger) Fatal(ctx context.Context, descr string) { +// FatalString logs a LevelFatal message which is only a string. A Fatal message +// automatically stops the process with an os.Exit(1) if the default +// MessageHandler is used. +func (l *Logger) FatalString(ctx context.Context, descr string) { l.Log(mkMsg(ctx, LevelFatal, descr)) } + +// Fatal logs a LevelFatal message. A Fatal message automatically stops the +// process with an os.Exit(1) if the default MessageHandler is used. +func (l *Logger) Fatal(ctx context.Context, descr string, err error) { + l.Log(mkErrMsg(ctx, LevelFatal, descr, err)) +}