All Products
Search
Document Center

Simple Log Service:Extended plug-ins: BASE64 (Encoding), BASE64 (Decoding), and MD5

Last Updated:Apr 22, 2025

If you use Logtail to collect logs, you can use the processor_base64_encoding and processor_md5 plug-ins to encode field values and the processor_base64_decoding plug-in to decode field values. This topic describes the parameters of the plug-ins and provides examples on how to configure the plug-ins.

Important
  • Form configuration: You can use form configuration to add the plug-in when you collect text logs or container stdout and stderr.

  • Editor configuration in JSON: You cannot use editor configuration in JSON to add the plug-in when you collect text logs.

Entry point

If you want to use a Logtail plug-in to process logs, you can add a Logtail plug-in configuration when you create or modify a Logtail configuration. For more information, see Overview of Logtail plug-ins for data processing.

BASE64 (Encoding)

You can use the processor_base64_encoding plug-in to encode field values.

Form configuration

Set the Processor Type parameter to BASE64 (Encoding). Then, configure other parameters based on the following table.

Parameter

Description

Original Field

The name of the original field.

New Field

The name of the new field to which the encoded value is assigned.

Report Original Field Missing Error

Specifies whether to report an error if the raw log does not contain the original field.

Editor configuration in JSON

Set the type parameter to processor_base64_encoding. Then, configure other parameters in the detail section based on the following table.

Parameter

Type

Required

Description

SourceKey

String

Yes

The name of the original field.

NewKey

String

Yes

The name of the new field to which the encoded value is assigned.

NoKeyError

Boolean

No

Specifies whether to report an error if the raw log does not contain the original field. Valid values:

  • true

  • false (default)

BASE64 (Decoding)

You can use the processor_base64_decoding plug-in to decode field values.

Form configuration

Set the Processor Type parameter to BASE64 (Decoding). Then, configure other parameters based on the following table.

Parameter

Description

Original Field

The name of the original field.

New Field

The name of the new field to which the decoded value is assigned.

Report Original Field Missing Error

Specifies whether to report an error if the raw log does not contain the original field.

Report Parsing Failure Error

Specifies whether to report an error if parsing fails.

Editor configuration in JSON

Set the type parameter to processor_base64_decoding.Then, configure other parameters in the detail section based on the following table.

Parameter

Type

Required

Description

SourceKey

String

Yes

The name of the original field.

NewKey

String

Yes

The name of the new field to which the decoded value is assigned.

NoKeyError

Boolean

No

Specifies whether to report an error if the raw log does not contain the original field. Valid values:

  • true

  • false (default)

DecodeError

Boolean

No

Specifies whether to report an error if parsing fails. Valid values:

  • true

  • false (default)

MD5

You can use the processor_md5 plug-in to encode field values by using the MD5 algorithm.

Form configuration

Set the Processor Type parameter to MD5. Then, configure other parameters based on the following table.

Parameter

Description

Original Field

The name of the original field.

New Field

The name of the new field to which the encoded value is assigned.

Report Original Field Missing Error

Specifies whether to report an error if the raw log does not contain the original field.

Editor configuration in JSON

Set the type parameter to processor_md5. Then, configure other parameters in the detail section based on the following table.

Parameter

Type

Required

Description

SourceKey

String

Yes

The name of the original field.

MD5Key

String

Yes

The name of the new field to which the encoded value is assigned.

NoKeyError

Boolean

No

Specifies whether to report an error if the raw log does not contain the original field. Valid values:

  • true

  • false (default)