Remove Logrus dependency and replace with slog for MBA-243 #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Closes: MBA-243
Summary
This PR removes the Logrus dependency (
github.com/sirupsen/logrus v1.9.3) and replaces all logging with Go's standard libraryslog. This eliminates an external dependency while maintaining equivalent logging functionality.Key Changes
Core Logging Migration (
internal/ghmcp/server.go)logrus.New()withslog.New(slog.NewTextHandler(...))logrus.Infof) to structured logging (slog.Infowith key-value pairs)slogLoggerandstdLoggeruse the same output destination whenLogFilePathis configured (initially had regression wherestdLoggeralways wrote to stderr)IOLogger Refactoring (
pkg/log/io.go)IOLoggerstruct to accept*slog.Loggerinstead of*logrus.Loggerl.logger.Infof("[stdin]: received %d bytes: %s", n, string(p[:n]))l.logger.Info("[stdin]: received bytes", "count", n, "data", string(p[:n]))Dependency Cleanup
github.com/sirupsen/logrus v1.9.3fromgo.modgo.sumviago mod tidyTradeoffs
slogis generally more performant than Logrus, especially for structured loggingTesting
LogFilePathconfigurationHuman Review Checklist
Critical areas to verify:
LogFilePathis set, bothslogLoggerandstdLoggerwrite to the same file (not stderr)EnableCommandLoggingandLogFilePathcombinationsLink to Devin run: https://app.devin.ai/sessions/f6e4a889c2af459ead9c3e94ebcea9e9
Requested by: @jakexcosme
JIRA: MBA-243