Add optional syslog logrus hook (#343)

* add optional syslog logrus hook

* document syslog
This commit is contained in:
tobi 2021-12-12 18:00:20 +01:00 committed by GitHub
commit c111b239f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 2242 additions and 37 deletions

View file

@ -19,11 +19,13 @@
package media
import (
"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/log"
"io/ioutil"
"testing"
"github.com/spf13/viper"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/stretchr/testify/suite"
)
@ -38,11 +40,11 @@ type MediaUtilTestSuite struct {
// SetupSuite sets some variables on the suite that we can use as consts (more or less) throughout
func (suite *MediaUtilTestSuite) SetupSuite() {
// doesn't use testrig.InitTestLog() helper to prevent import cycle
err := log.Initialize(logrus.TraceLevel.String())
viper.Set(config.Keys.LogLevel, "trace")
err := log.Initialize()
if err != nil {
panic(err)
}
}
func (suite *MediaUtilTestSuite) TearDownSuite() {