textencodingextension

package module
v0.117.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 12 Imported by: 2

README

Text encoding extension

Status
Stability development
Distributions []
Issues Open issues Closed issues
Code Owners @MovieStoreGuy, @atoulme

The text_encoding extension is an encoding extension that can unmarshal and marshal logs.

The extension accepts an encoding and separator to unmarshal data as the body of one or more log records. The separator accepts regular expressions.

When marshaling logs, the extension will return the body content, separated by a separator.

Here is the default configuration:

extensions:
  text_encoding:
    encoding: utf8
    marshaling_separator: "\n"
    unmarshaling_separator: "\r?\n"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

Types

type Config

type Config struct {
	Encoding              string `mapstructure:"encoding"`
	MarshalingSeparator   string `mapstructure:"marshaling_separator"`
	UnmarshalingSeparator string `mapstructure:"unmarshaling_separator"`
}

func (*Config) Validate added in v0.101.0

func (c *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL