v0.31.1 minor fixes and updates
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
This commit is contained in:
1 parent
6bd5e12a60
commit
c2e3d669da
10 files changed
+14
-18
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Builder pin and go.mod directive are the same patch release deliberately;
|
# Builder pin and go.mod directive are the same patch release deliberately;
|
||||||
# an older builder reports the mismatch only after downloading the module graph.
|
# an older builder reports the mismatch only after downloading the module graph.
|
||||||
ARG GO_VERSION=1.27.1
|
ARG GO_VERSION=1.27.2
|
||||||
|
|
||||||
# The builder runs natively and cross-compiles, so foreign platforms need no emulation.
|
# The builder runs natively and cross-compiles, so foreign platforms need no emulation.
|
||||||
FROM --platform=$BUILDPLATFORM docker.io/library/golang:${GO_VERSION}-alpine AS build
|
FROM --platform=$BUILDPLATFORM docker.io/library/golang:${GO_VERSION}-alpine AS build
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<img src="logwisp-logo.svg" alt="LogWisp Logo" width="160"/>
|
<img src="logwisp-logo.svg" alt="LogWisp Logo" width="160"/>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://golang.org"><img src="https://img.shields.io/badge/Go-1.27.1-00ADD8?style=flat&logo=go" alt="Go"></a>
|
<a href="https://golang.org"><img src="https://img.shields.io/badge/Go-1.27.2-00ADD8?style=flat&logo=go" alt="Go"></a>
|
||||||
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg" alt="License"></a>
|
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg" alt="License"></a>
|
||||||
<img src="https://img.shields.io/badge/Platform-Linux%20|%20FreeBSD%20|%20amd64-lightgrey" alt="Platforms">
|
<img src="https://img.shields.io/badge/Platform-Linux%20|%20FreeBSD%20|%20amd64-lightgrey" alt="Platforms">
|
||||||
<a href="doc/"><img src="https://img.shields.io/badge/Docs-Available-green.svg" alt="Documentation"></a>
|
<a href="doc/"><img src="https://img.shields.io/badge/Docs-Available-green.svg" alt="Documentation"></a>
|
||||||
@@ -196,7 +196,7 @@ systemd unit or FreeBSD rc.d script and its configuration; `make deb` and
|
|||||||
|
|
||||||
- **Operating systems**: Linux (kernel 6.10+), FreeBSD (14.0+)
|
- **Operating systems**: Linux (kernel 6.10+), FreeBSD (14.0+)
|
||||||
- **Architecture**: amd64
|
- **Architecture**: amd64
|
||||||
- **Go**: 1.27.1+ to build from source
|
- **Go**: 1.27.2+ to build from source
|
||||||
|
|
||||||
Network sources and sinks use IPv4 or IPv6, following the address family of
|
Network sources and sinks use IPv4 or IPv6, following the address family of
|
||||||
the configured host.
|
the configured host.
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ lw -c config.toml
|
|||||||
|
|
||||||
- **Operating systems**: Linux (kernel 6.10+), FreeBSD (14.0+)
|
- **Operating systems**: Linux (kernel 6.10+), FreeBSD (14.0+)
|
||||||
- **Architecture**: amd64
|
- **Architecture**: amd64
|
||||||
- **Go**: 1.27.1+ to build from source
|
- **Go**: 1.27.2+ to build from source
|
||||||
|
|
||||||
Network sources and sinks bind and dial IPv4 or IPv6, each keeping strictly to
|
Network sources and sinks bind and dial IPv4 or IPv6, each keeping strictly to
|
||||||
the family of its host ([Networking](networking.md#address-family)).
|
the family of its host ([Networking](networking.md#address-family)).
|
||||||
|
|||||||
+3
-4
@@ -21,7 +21,7 @@ Omitting `[pipelines.flow.format]` entirely selects `raw`.
|
|||||||
|
|
||||||
Each as type and default:
|
Each as type and default:
|
||||||
|
|
||||||
- `type` (string, `raw`): `raw`, `txt` (alias `text`), or `json`.
|
- `type` (string, `raw`): `raw`, `txt`, or `json`.
|
||||||
- `sanitizer_policy` (string, derived from `type`): `raw`, `txt`, `json`, or
|
- `sanitizer_policy` (string, derived from `type`): `raw`, `txt`, `json`, or
|
||||||
`shell`.
|
`shell`.
|
||||||
- `flags` (int64, `0`): bitmask override; `0` selects a per-type default.
|
- `flags` (int64, `0`): bitmask override; `0` selects a per-type default.
|
||||||
@@ -122,9 +122,8 @@ Each policy, then what to use it with:
|
|||||||
- `shell`: strips shell metacharacters, whitespace, and control characters.
|
- `shell`: strips shell metacharacters, whitespace, and control characters.
|
||||||
- Data that will be passed to a command.
|
- Data that will be passed to a command.
|
||||||
|
|
||||||
When `sanitizer_policy` is omitted, the policy is derived from `type`: `json`
|
When `sanitizer_policy` is omitted, it is the policy of the same name as
|
||||||
for `json`, `txt` for `txt`/`text`, and `raw` for anything else — so the safe
|
`type`, so the safe pairing is the default.
|
||||||
pairing is the default.
|
|
||||||
|
|
||||||
> `shell` strips dangerous characters but is **not** sufficient to make a string
|
> `shell` strips dangerous characters but is **not** sufficient to make a string
|
||||||
> safe for shell construction. Pass arguments through `exec` argv instead of
|
> safe for shell construction. Pass arguments through `exec` argv instead of
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
- Operating systems: Linux (kernel 6.10+), FreeBSD (14.0+)
|
- Operating systems: Linux (kernel 6.10+), FreeBSD (14.0+)
|
||||||
- Architecture: amd64; arm64 builds but is untested
|
- Architecture: amd64; arm64 builds but is untested
|
||||||
- To build: Go 1.27.1 or newer (FreeBSD: the `go127` package), and GNU make
|
- To build: Go 1.27.2 or newer (FreeBSD: the `go127` package), and GNU make
|
||||||
or BSD make
|
or BSD make
|
||||||
- For `make e2e`: bash 5+, coreutils, curl, openssl and go (the proxy test
|
- For `make e2e`: bash 5+, coreutils, curl, openssl and go (the proxy test
|
||||||
builds its reverse proxy). Optional, else those checks SKIP: node with
|
builds its reverse proxy). Optional, else those checks SKIP: node with
|
||||||
|
|||||||
+1
-1
@@ -114,7 +114,7 @@ Steps:
|
|||||||
4. `lixenwraith/terminal` v0.2.0: done: 16 and no color, the terminal's
|
4. `lixenwraith/terminal` v0.2.0: done: 16 and no color, the terminal's
|
||||||
default colors, `/dev/tty`, bracketed paste, themed form controls. Still
|
default colors, `/dev/tty`, bracketed paste, themed form controls. Still
|
||||||
optional, in `color`: export the 16 xterm reference shades (RGBTo16 maps
|
optional, in `color`: export the 16 xterm reference shades (RGBTo16 maps
|
||||||
the site's hues badly, so the 16-color tier is chosen by hand). v0.3.0:
|
the site's hues badly, so the 16-color tier is chosen by hand). v0.2.1:
|
||||||
radio buttons, narrow form fields and option lists, menus, frames, rules,
|
radio buttons, narrow form fields and option lists, menus, frames, rules,
|
||||||
wires and windows, moved from `lw --tui`.
|
wires and windows, moved from `lw --tui`.
|
||||||
5. `lw --tui`: done ([doc/cli.md](cli.md#lw---tui)).
|
5. `lw --tui`: done ([doc/cli.md](cli.md#lw---tui)).
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ github.com/lixenwraith/config v0.2.2 h1:X+l3Tf8Rbk49cipYBJU7/pfdw5wDwD4hRxtFH7rZ
|
|||||||
github.com/lixenwraith/config v0.2.2/go.mod h1:yfJQwKS+/6Dg70GIoHeYc0eYztOPETpqe6nUIbakcyg=
|
github.com/lixenwraith/config v0.2.2/go.mod h1:yfJQwKS+/6Dg70GIoHeYc0eYztOPETpqe6nUIbakcyg=
|
||||||
github.com/lixenwraith/log v0.1.11 h1:dKWLnaR8dhXxj4l/aU5XZiFIsr8geaJQbOf8m7SiKhU=
|
github.com/lixenwraith/log v0.1.11 h1:dKWLnaR8dhXxj4l/aU5XZiFIsr8geaJQbOf8m7SiKhU=
|
||||||
github.com/lixenwraith/log v0.1.11/go.mod h1:EE8i5nSAW2yZBTytKuhdgehmgzrby6kW1k5DyH1SvBg=
|
github.com/lixenwraith/log v0.1.11/go.mod h1:EE8i5nSAW2yZBTytKuhdgehmgzrby6kW1k5DyH1SvBg=
|
||||||
github.com/lixenwraith/terminal v0.2.1-0.20261010134811-bbb83d6c20df h1:HPfMYYSfNva8cMlgyTtZntu3oUwNKXW48rCwpmTEPoU=
|
|
||||||
github.com/lixenwraith/terminal v0.2.1-0.20261010134811-bbb83d6c20df/go.mod h1:f9Ntk+xKBS2LWQEe6gk/1TOpG22HH0scTe4wlPhEy44=
|
|
||||||
github.com/lixenwraith/terminal v0.2.1 h1:KsMfmxrRicBFWMdXJIEJ3cpLWVw6IoNF8GwgsxbD3kQ=
|
github.com/lixenwraith/terminal v0.2.1 h1:KsMfmxrRicBFWMdXJIEJ3cpLWVw6IoNF8GwgsxbD3kQ=
|
||||||
github.com/lixenwraith/terminal v0.2.1/go.mod h1:V0P/FDpY+UeSvx1VIVuTG7llo0RbK3XrSJLDA7GqHqY=
|
github.com/lixenwraith/terminal v0.2.1/go.mod h1:V0P/FDpY+UeSvx1VIVuTG7llo0RbK3XrSJLDA7GqHqY=
|
||||||
github.com/lixenwraith/toml v0.1.3 h1:mhnNVLNogdaqjGd3eC4rV9ZqY3j1Sv+DK1erZ+SPFeI=
|
github.com/lixenwraith/toml v0.1.3 h1:mhnNVLNogdaqjGd3eC4rV9ZqY3j1Sv+DK1erZ+SPFeI=
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ type HeartbeatConfig struct {
|
|||||||
|
|
||||||
// FormatConfig is how a pipeline writes its entries
|
// FormatConfig is how a pipeline writes its entries
|
||||||
type FormatConfig struct {
|
type FormatConfig struct {
|
||||||
Type string `toml:"type" default:"raw" lw:"enum=raw|txt|text|json" help:"entry format; text is txt"`
|
Type string `toml:"type" default:"raw" lw:"enum=raw|txt|json" help:"entry format"`
|
||||||
Flags int64 `toml:"flags,omitempty" lw:"zero=by type" help:"formatter flags"`
|
Flags int64 `toml:"flags,omitempty" lw:"zero=by type" help:"formatter flags"`
|
||||||
TimestampFormat string `toml:"timestamp_format,omitempty" lw:"zero=RFC 3339" help:"Go time layout of timestamps"`
|
TimestampFormat string `toml:"timestamp_format,omitempty" lw:"zero=RFC 3339" help:"Go time layout of timestamps"`
|
||||||
SanitizerPolicy string `toml:"sanitizer_policy,omitempty" lw:"enum=raw|json|txt|shell,zero=by type" help:"how control characters are escaped"`
|
SanitizerPolicy string `toml:"sanitizer_policy,omitempty" lw:"enum=raw|json|txt|shell,zero=by type" help:"how control characters are escaped"`
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ func TestZeroDefaultsAndNegatives(t *testing.T) {
|
|||||||
if err != nil || chain.BackoffMaxMS != 30000 {
|
if err != nil || chain.BackoffMaxMS != 30000 {
|
||||||
t.Fatalf("backoff maximum below the minimum: %+v %v", chain, err)
|
t.Fatalf("backoff maximum below the minimum: %+v %v", chain, err)
|
||||||
}
|
}
|
||||||
format := FormatConfig{Type: "text"}
|
|
||||||
if err := Settle(&format); err != nil {
|
|
||||||
t.Fatalf("format text: %v", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command-line text and JSON numbers become the kinds the options declare, so
|
// Command-line text and JSON numbers become the kinds the options declare, so
|
||||||
@@ -123,6 +119,9 @@ func TestValidateConfigNamesThePath(t *testing.T) {
|
|||||||
"color: must be one of auto, always, never, got \"\"": func(c *Config) {
|
"color: must be one of auto, always, never, got \"\"": func(c *Config) {
|
||||||
c.Color = ""
|
c.Color = ""
|
||||||
},
|
},
|
||||||
|
`pipelines[0].flow.format.type: must be one of raw, txt, json, got "text"`: func(c *Config) {
|
||||||
|
c.Pipelines[0].Flow.Format = &FormatConfig{Type: "text"}
|
||||||
|
},
|
||||||
"pipelines[0].flow.heartbeat.interval_ms: must be at least 100, got 10": func(c *Config) {
|
"pipelines[0].flow.heartbeat.interval_ms: must be at least 100, got 10": func(c *Config) {
|
||||||
c.Pipelines[0].Flow.Heartbeat = &HeartbeatConfig{IntervalMS: 10}
|
c.Pipelines[0].Flow.Heartbeat = &HeartbeatConfig{IntervalMS: 10}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ func NewFormatterAdapter(cfg *config.FormatConfig) (*FormatterAdapter, error) {
|
|||||||
switch cfg.Type {
|
switch cfg.Type {
|
||||||
case "json":
|
case "json":
|
||||||
s = sanitizer.New().Policy(sanitizer.PolicyJSON)
|
s = sanitizer.New().Policy(sanitizer.PolicyJSON)
|
||||||
case "txt", "text":
|
case "txt":
|
||||||
s = sanitizer.New().Policy(sanitizer.PolicyTxt)
|
s = sanitizer.New().Policy(sanitizer.PolicyTxt)
|
||||||
default:
|
default:
|
||||||
s = sanitizer.New().Policy(sanitizer.PolicyRaw)
|
s = sanitizer.New().Policy(sanitizer.PolicyRaw)
|
||||||
|
|||||||
Reference in new issue
Block a user