Skip to content

Commit

Permalink
fix urls
Browse files Browse the repository at this point in the history
  • Loading branch information
lainio committed Nov 29, 2024
1 parent f08499c commit 8c85e35
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func PanicTracer() io.Writer {
return tracer.Panic.Tracer()
}

// LogTracer returns a current [io.Writer] for the explicit [try.Result.Logf]
// function and automatic logging used in [Handle] and [Catch]. The
// default value is nil.
// LogTracer returns a current [io.Writer] for the explicit
// [github.com/lainio/err2/try.Result.Logf] function and automatic logging used
// in [Handle] and [Catch]. The default value is nil.
func LogTracer() io.Writer {
return tracer.Log.Tracer()
}
Expand All @@ -49,7 +49,7 @@ func LogTracer() io.Writer {
// have multiple sections because every [Handle] and [Catch] prints it. If an
// error happens in a deep call stack, the error trace includes various parts.
// If you prefer similar to [Zig Error Return Traces], where you see how
// error bubbles up, you should use [SetErrRetTrace].
// error bubbles up, you should use [SetErrRetTracer].
//
// Remember that you can reset these with [flag] package support. See
// documentation of err2 package's flag section.
Expand Down Expand Up @@ -93,13 +93,14 @@ func SetPanicTracer(w io.Writer) {
tracer.Panic.SetTracer(w)
}

// SetLogTracer sets a current [io.Writer] for the explicit [try.Result.Logf]
// function and automatic logging used in [Handle] and [Catch]. The
// default is nil and then err2 uses std log package for logging.
// SetLogTracer sets a current [io.Writer] for the explicit
// [github.com/lainio/err2/try.Result.Logf] function and automatic logging used
// in [Handle] and [Catch]. The default is nil and then err2 uses std log
// package for logging.
//
// You can use the std log package to redirect other logging packages like [glog]
// to automatically work with the err2 package. For the [glog], add this line at
// the beginning of your app:
// You can use the std log package to redirect other logging packages like
// [github.com/golang/glog] to automatically work with the err2 package. For the
// [github.com/golang/glog], add this line at the beginning of your app:
//
// glog.CopyStandardLogTo("INFO")
//
Expand Down

0 comments on commit 8c85e35

Please sign in to comment.