Commit Graph

1248 Commits

Author SHA1 Message Date
David Bariod bde44a27f3
Merge pull request #1246 from thaJeztah/bump_testify
go.mod: github.com/stretchr/testify v1.7.0
2021-03-12 16:18:03 +01:00
Sebastiaan van Stijn 9b555f4fd7
go.mod: github.com/stretchr/testify v1.7.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 15:51:52 +01:00
David Bariod fe9e9fcbba
Merge pull request #1239 from thaJeztah/move_to_gha
CI: use GitHub Actions
2021-03-09 13:46:41 +01:00
David Bariod bdc0db8ead
Merge pull request #1244 from sirupsen/dbd-release
update changelog
2021-03-09 11:28:17 +01:00
David Bariod 1bfef4b986 update changelog 2021-03-09 11:27:33 +01:00
David Bariod 7a997b9285 improve documentation about timestamp format 2021-03-08 18:02:30 +01:00
Sebastiaan van Stijn cbd14ede4d
CI: use GitHub Actions
Use GitHub actions to run golang-ci-lint, cross, and test.

The "Test()" target in Mage was a plain "go test -v ./...", and should be
portable to other CI systems if needed; running it through the mage file
effectively resulted in "compile a go binary to run go".

The "Lint()" target in Mage relied on Travis CI setting up Golang-CI lint
before it was executed, which required bash. Moving it to GitHub actions
also allowed it to be run on Windows. Golang CI can still be run locally
either through the mage file (which is kept for now), or running
`golangci-lint run ./...` after installing golangci-lint.

The "CrossBuild() Mage target is still used to perform cross-compile, as it
contains code to generate the GOOS/GOARCH matrix, which makes it easier
to run locally.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 14:17:47 +01:00
Sebastiaan van Stijn bdb7d4c531
go.mod: update golang.org/x/sys to fix openbsd/mips64 on Go 1.16
This should hopefully fix cross-compile on openbsd/mips64 on Go 1.16

    Building for GOOS=openbsd GOARCH=mips64
    # golang.org/x/sys/unix
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/fcntl.go:26:42: undefined: Flock_t
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:26:47: undefined: Winsize
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:37:47: undefined: Termios
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:55:42: undefined: Winsize
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:61:42: undefined: Termios
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/syscall_openbsd.go:34:6: missing function body
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/syscall_unix_gc.go:12:6: missing function body
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/syscall_unix_gc.go:13:6: missing function body
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/syscall_unix_gc.go:14:6: missing function body
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/syscall_unix_gc.go:15:6: missing function body
    Error: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20191026070338-33540a1f6037/unix/ioctl.go:61:42: too many errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 13:57:50 +01:00
David Bariod f104497f2b
Merge pull request #1238 from thaJeztah/move_mage
CI: run mage with "-v" to not discard output, and move mage to a submodule
2021-02-19 13:54:12 +01:00
Sebastiaan van Stijn 1d8091a7e9
move "mage" to a separate module
Move the magefile related files to a submodule, so that it
does not become a dependency for logrus itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 12:47:40 +01:00
Sebastiaan van Stijn feebf74e97
travis: run mage with -v to not discard output
Before this:

    $ go run mage.go lint
    Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
    exit status 1

    $ go run mage.go test
    Error: running "go test -race -v ./..." failed with exit code 1
    exit status 1

After this:

    $ go run mage.go -v lint
    Running target: Lint
    exec: /Users/sebastiaan/go/bin/golangci-lint run ./...
    entry.go:89:6: `iamNotUsed` is unused (deadcode)
    func iamNotUsed() {
         ^
    Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
    exit status 1

    $ go run mage.go -v test
    Running target: Test
    exec: go test -race -v ./...
    === RUN   TestRegister
    ...
    ?   	github.com/sirupsen/logrus/internal/testutils	[no test files]
    FAIL
    Error: running "go test -race -v ./..." failed with exit code 1
    exit status 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 12:42:03 +01:00
David Bariod 6cff360233
Merge pull request #1234 from sirupsen/dbd-cleanup
fix race condition AddHook and traces
2021-02-18 08:49:52 +01:00
David Bariod d172886045 fix race condition AddHook and traces 2021-02-17 18:14:05 +01:00
David Bariod d59e5619da
Merge pull request #1231 from sirupsen/dbd-cleanup
cleanup
2021-02-17 17:48:57 +01:00
David Bariod 35ab8d8fef update changelog 2021-02-16 18:18:17 +01:00
David Bariod 5cb4bf65c6 code and comments clean up 2021-02-16 18:13:03 +01:00
David Bariod 15ca3c0694
Merge pull request #1230 from sirupsen/new-release
update changelog
2021-02-16 11:21:45 +01:00
David Bariod 67c117ceb0 update changelog 2021-02-16 11:20:51 +01:00
David Bariod 88d56b69b5
Merge pull request #1229 from sirupsen/fix-data-entry-race
fix for entry data field race condition
2021-02-16 11:14:48 +01:00
David Bariod ac6e35b4c2 fix for entry data field race condition 2021-02-16 10:31:51 +01:00
David Bariod f513f99c15
Merge pull request #1228 from sirupsen/travis_upd
update travis scripts
2021-02-14 16:57:45 +01:00
David Bariod 003c63ac69 undo golang version bump 2021-02-14 16:46:49 +01:00
David Bariod 6a61186a64 update travis scripts
* bump to go 1.16
* remove unneeded part in travis/install.sh
2021-02-13 07:07:38 +01:00
David Bariod c6da0523dd
Merge pull request #1208 from sirupsen/magefile
migrate ci target from bash scripts to magefile
2021-02-13 07:05:01 +01:00
David Bariod 3986c92379 add a test target in the magefile 2021-02-13 06:45:48 +01:00
David Bariod cd4bf4ef8d
Merge pull request #1212 from alecbz/alec/remove-dead-panic
Remove dead panic in Entry.Panic
2020-12-17 17:18:52 +01:00
David Bariod 44d983dbc2
Merge pull request #1185 from CreativeCactus/patch-1
Replace %v with %w for error
2020-12-17 16:44:23 +01:00
David Bariod b02b418f8f migrate lint script to a mage target 2020-12-17 15:58:09 +01:00
Alec Benzer 02fcb16005 Remove dead panic in Entry.Panic
[Entry.log itself panics][0] when the log level is set to PanicLevel, (and
PanicLevel is always eneabled) so this second panic will never be reached.

[0]: 8ae478eb8a/entry.go (L253)
2020-12-15 18:25:34 -05:00
David Bariod 4b818a50d4 migrate cross build target from bash script to mage 2020-11-26 06:33:19 +01:00
David Bariod 8ae478eb8a
Merge pull request #1197 from sirupsen/travis_build
bump go and golangci-lint versions in travis ci
2020-11-26 06:17:10 +01:00
David Bariod 6121f5c019
Merge pull request #1207 from sirupsen/remove_stale_bot
desactivate stale bot
2020-11-24 10:53:45 +01:00
David Bariod e3e79b6306 desactivate stale bot 2020-11-24 08:47:25 +01:00
David Bariod a752a62f5e
Merge pull request #1206 from l-lindsay/zosbuild
Add build tag to enable a successful build for zos
2020-11-21 19:30:40 +01:00
l-lindsay be16a81096 Add build tag to enable a successful build for zos 2020-11-20 14:25:07 -05:00
David Bariod 89b92b94dd one more linter error fixed 2020-11-08 07:19:28 +01:00
David Bariod e328a4e3f4 fix linter errors 2020-11-08 07:07:05 +01:00
David Bariod 581900062e bump golangci-lint version 2020-11-06 13:26:15 +01:00
David Bariod 0d28e29335 bump golang versions in travis ci 2020-11-06 13:14:07 +01:00
CreativeCactus c81a54c5aa
Replace %v with %w for error
https://golang.org/pkg/fmt/#Errorf
2020-10-01 17:36:44 +10:00
David Bariod d131c24e23
Merge pull request #1183 from shogo82148/update-changelog-1.7.0
update changelog with v1.7.0
2020-09-30 13:26:25 +02:00
Ichinose Shogo c6b865f1d2
update changelog with v1.7.0 2020-09-29 15:47:36 +09:00
Stanislas Lange 4013bd3dd6
README: fix indentation in snippet 2020-08-10 13:37:49 +02:00
David Bariod 6699a89a23
Merge pull request #1145 from sirupsen/custom_buffer_pool
Add an API to plug a custom buffer free item mangement system
2020-05-28 10:56:38 +02:00
David Bariod 64a59449f3 Add an API to plug a custom buffer free item mangement system 2020-05-28 10:47:50 +02:00
David Bariod 42baed85eb
Merge pull request #1144 from sohel-sheikh/patch-1
Update doc for new logger
2020-05-26 09:04:19 +02:00
Sohel 630ea450e6
Update doc for new logger
Update default formatter for new logger from JsonFormatter to TextFormatter
2020-05-26 10:26:28 +05:30
David Bariod 20dcf91051
Merge pull request #1142 from sirupsen/function-log
Function log
2020-05-19 17:10:51 +02:00
David Bariod ba4da53cff Improve tests for logger.*Fn functions 2020-05-19 17:02:33 +02:00
David Bariod d7edea4451 Merge branch 'feature/function-log' of https://github.com/Azer0s/logrus into Azer0s-feature/function-log 2020-05-19 16:58:31 +02:00