18 lines
615 B
Go
18 lines
615 B
Go
package basic
|
|
|
|
import (
|
|
"log/slog"
|
|
|
|
"git.yeij.top/AskaEth/Cyrene_v2/internal/logger"
|
|
)
|
|
|
|
// log returns a logger tagged with this plugin's source so every record it emits
|
|
// is traceable back to its owning module (DevDocs/02-development-constraints.md
|
|
// §五). The sdk.Tool surface does not carry an injected base logger, so a fresh
|
|
// one is built on demand; it is only used on the error path, where the cost is
|
|
// negligible. Errors are also returned to the caller so the failure is never
|
|
// swallowed.
|
|
func log() *slog.Logger {
|
|
return logger.WithSource(logger.New(logger.Options{}), "plugins/tools/basic")
|
|
}
|