summaryrefslogtreecommitdiff
path: root/internal/log/syslog_test.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2022-10-01 16:36:08 +0100
committerLibravatar GitHub <noreply@github.com>2022-10-01 16:36:08 +0100
commit9fcfe61410252060e6e96546b0598015cacd8a58 (patch)
treef18007e34bbbe95e74a93003e27eb2659d5dd77b /internal/log/syslog_test.go
parent[feature] update config types to use bytesize.Size (#828) (diff)
downloadgotosocial-9fcfe61410252060e6e96546b0598015cacd8a58.tar.xz
[chore] small logging cleanup (#869)
* handle more syslogging levels, use singular time format variable, add entry .New() function * pass in calldepth to lower log functions to ensure correctly set * update truncate length in syslog test
Diffstat (limited to 'internal/log/syslog_test.go')
-rw-r--r--internal/log/syslog_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/log/syslog_test.go b/internal/log/syslog_test.go
index aafa93419..ad7c6ffbe 100644
--- a/internal/log/syslog_test.go
+++ b/internal/log/syslog_test.go
@@ -79,7 +79,7 @@ func (suite *SyslogTestSuite) TestSyslogLongMessage() {
prefix := fmt.Sprintf(`timestamp="02/01/2006 15:04:05.000" func=%s level=WARN msg="`, funcName)
entry := <-suite.syslogChannel
- regex := fmt.Sprintf(`timestamp=.* func=.* level=WARN msg="%s\.\.\.`, longMessage[:1700-len(prefix)-3])
+ regex := fmt.Sprintf(`timestamp=.* func=.* level=WARN msg="%s`, longMessage[:2048-len(prefix)])
suite.Regexp(regexp.MustCompile(regex), entry["content"])
}
@@ -110,7 +110,7 @@ func (suite *SyslogTestSuite) TestSyslogLongMessageUnixgram() {
prefix := fmt.Sprintf(`timestamp="02/01/2006 15:04:05.000" func=%s level=WARN msg="`, funcName)
entry := <-syslogChannel
- regex := fmt.Sprintf(`timestamp=.* func=.* level=WARN msg="%s\.\.\.`, longMessage[:1700-len(prefix)-3])
+ regex := fmt.Sprintf(`timestamp=.* func=.* level=WARN msg="%s`, longMessage[:2048-len(prefix)])
suite.Regexp(regexp.MustCompile(regex), entry["content"])