Skip to content

Commit 614fd44

Browse files
committed
upgrade dependencies, go to 1.12.x and fix ES retry logic
1 parent f9849b5 commit 614fd44

File tree

12 files changed

+207
-75
lines changed

12 files changed

+207
-75
lines changed

Diff for: Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.11.2-alpine as builder
1+
FROM golang:1.12.6-alpine as builder
22
MAINTAINER Alexandre Ferland <[email protected]>
33

44
ENV GO111MODULE=on
@@ -18,5 +18,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
1818

1919
FROM scratch
2020
COPY --from=builder /build/tinysyslog /tinysyslog
21+
2122
EXPOSE 5140 5140/udp
23+
2224
ENTRYPOINT ["/tinysyslog", "--address", "0.0.0.0:5140"]

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Alexandre Ferland
3+
Copyright (c) 2019 Alexandre Ferland
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,24 @@ You can now send logs from your app(s) to `tinysyslog:5140`.
6969
## Configuration
7070
```
7171
Usage of ./tinysyslog:
72-
--address string IP and port to listen on. (default "127.0.0.1:5140")
73-
--filter string Filter to filter logs with. Valid filters are: null and regex. Null doesn't do any filtering. (default "null")
74-
--filter-regex string Regex to filter with.
75-
--log-file string The log file to write to. 'stdout' means log to stdout and 'stderr' means log to stderr. (default "stdout")
76-
--log-format string The log format. Valid format values are: text, json. (default "text")
77-
--log-level string The granularity of log outputs. Valid level names are: debug, info, warning, error and critical. (default "info")
78-
--mutator string Mutator type to use. Valid mutators are: text, json. (default "text")
79-
--sink string Sink to save syslogs to. Valid sinks are: console and filesystem. (default "console")
80-
--sink-console-output string Console to output too. Valid outputs are: stdout, stderr. (default "stdout")
81-
--sink-filesystem-filename string File to write incoming logs to. (default "syslog.log")
82-
--sink-filesystem-max-age int Maximum age (in days) before a log is deleted. (default 30)
83-
--sink-filesystem-max-backups int Maximum backups to keep. (default 10)
84-
--sink-filesystem-max-size int Maximum log size (in megabytes) before it's rotated. (default 100)
85-
--socket-type string Type of socket to use, TCP or UDP. If no type is specified, both are used.
72+
--address string IP and port to listen on. (default "127.0.0.1:5140")
73+
--filter string Filter to filter logs with. Valid filters are: null and regex. Null doesn't do any filtering. (default "null")
74+
--filter-grok-fields strings Grok fields to keep.
75+
--filter-grok-pattern string Grok pattern to filter with.
76+
--filter-regex string Regex to filter with.
77+
--log-file string The log file to write to. 'stdout' means log to stdout and 'stderr' means log to stderr. (default "stdout")
78+
--log-format string The log format. Valid format values are: text, json. (default "text")
79+
--log-level string The granularity of log outputs. Valid level names are: debug, info, warning, error and critical. (default "info")
80+
--mutator string Mutator type to use. Valid mutators are: text, json. (default "text")
81+
--sink-console-output string Console to output too. Valid outputs are: stdout, stderr. (default "stdout")
82+
--sink-elasticsearch-address string Elasticsearch server address. (default "http://127.0.0.1:9200")
83+
--sink-elasticsearch-index-name string Elasticsearch index name. (default "tinysyslog")
84+
--sink-filesystem-filename string File to write incoming logs to. (default "syslog.log")
85+
--sink-filesystem-max-age int Maximum age (in days) before a log is deleted. (default 30)
86+
--sink-filesystem-max-backups int Maximum backups to keep. (default 10)
87+
--sink-filesystem-max-size int Maximum log size (in megabytes) before it's rotated. (default 100)
88+
--sinks strings Sinks to save syslogs to. Valid sinks are: console, elasticsearch and filesystem. (default [console])
89+
--socket-type string Type of socket to use, TCP or UDP. If no type is specified, both are used.
8690
```
8791

8892
## Benchmarks

Diff for: factories.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"github.com/sirupsen/logrus"
88
"github.com/spf13/viper"
99

10-
"github.com/admiralobvious/tinysyslog/filters"
11-
"github.com/admiralobvious/tinysyslog/mutators"
12-
"github.com/admiralobvious/tinysyslog/sinks"
10+
"tinysyslog/filters"
11+
"tinysyslog/mutators"
12+
"tinysyslog/sinks"
1313
)
1414

1515
// MutatorFactory creates a new object with mutators.Mutator interface

Diff for: go.mod

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
module github.com/admiralobvious/tinysyslog
1+
module tinysyslog
2+
3+
go 1.12
24

35
require (
4-
github.com/BurntSushi/toml v0.3.1 // indirect
5-
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect
6-
github.com/olivere/elastic v6.2.15+incompatible
7-
github.com/pkg/errors v0.8.1 // indirect
8-
github.com/sirupsen/logrus v1.2.0
6+
github.com/fortytw2/leaktest v1.3.0 // indirect
7+
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
8+
github.com/olivere/elastic v6.2.19+incompatible
9+
github.com/sirupsen/logrus v1.4.2
910
github.com/spf13/pflag v1.0.3
10-
github.com/spf13/viper v1.2.1
11+
github.com/spf13/viper v1.4.0
1112
github.com/vjeantet/grok v1.0.0
1213
gopkg.in/mcuadros/go-syslog.v2 v2.2.1
1314
gopkg.in/natefinch/lumberjack.v2 v2.0.0

0 commit comments

Comments
 (0)