diff options
Diffstat (limited to 'internal/web')
| -rw-r--r-- | internal/web/base.go | 8 | ||||
| -rw-r--r-- | internal/web/thread.go | 3 | 
2 files changed, 5 insertions, 6 deletions
| diff --git a/internal/web/base.go b/internal/web/base.go index 7be834a46..0eda1185a 100644 --- a/internal/web/base.go +++ b/internal/web/base.go @@ -36,20 +36,18 @@ import (  type Module struct {  	config    *config.Config  	processor processing.Processor -	log       *logrus.Logger  }  // New returns a new api.ClientModule for web pages. -func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor) api.ClientModule {  	return &Module{  		config:    config, -		log:       log,  		processor: processor,  	}  }  func (m *Module) baseHandler(c *gin.Context) { -	l := m.log.WithField("func", "BaseGETHandler") +	l := logrus.WithField("func", "BaseGETHandler")  	l.Trace("serving index html")  	instance, err := m.processor.InstanceGet(c.Request.Context(), m.config.Host) @@ -66,7 +64,7 @@ func (m *Module) baseHandler(c *gin.Context) {  // NotFoundHandler serves a 404 html page instead of a blank 404 error.  func (m *Module) NotFoundHandler(c *gin.Context) { -	l := m.log.WithField("func", "404") +	l := logrus.WithField("func", "404")  	l.Trace("serving 404 html")  	instance, err := m.processor.InstanceGet(c.Request.Context(), m.config.Host) diff --git a/internal/web/thread.go b/internal/web/thread.go index 69c9674ff..a359107cc 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -19,6 +19,7 @@  package web  import ( +	"github.com/sirupsen/logrus"  	"net/http"  	"github.com/gin-gonic/gin" @@ -31,7 +32,7 @@ type statusLink struct {  }  func (m *Module) threadTemplateHandler(c *gin.Context) { -	l := m.log.WithField("func", "threadTemplateGET") +	l := logrus.WithField("func", "threadTemplateGET")  	l.Trace("rendering thread template")  	ctx := c.Request.Context() | 
