Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strptime ¶
type Strptime struct { SourceKey string `comment:"The source key prepared to be parsed by strptime."` Format string `comment:"The source key formatted pattern, more details please see [here](https://golang.org/pkg/time/#Time.Format)."` KeepSource bool `comment:"Optional. Specifies whether to keep the source key in the log content after the processing."` AdjustUTCOffset bool `comment:"Optional. Specifies whether to modify the time zone."` UTCOffset int `` /* 150-byte string literal not displayed */ AlarmIfFail bool `comment:"Optional. Specifies whether to trigger an alert if the time information fails to be extracted."` EnablePreciseTimestamp bool `comment:"Optional. Specifies whether to enable precise timestamp."` PreciseTimestampKey string `comment:"Optional. The generated precise timestamp key."` PreciseTimestampUnit string `comment:"Optional. The generated precise timestamp unit."` // contains filtered or unexported fields }
Strptime use strptime to parse specified field (through SourceKey) with Format, and overwrite the time of log if parsing is successful.
Format comment Format follows rules of C strptime, but %Z does not support CST.
UTCOffset comment By default, the processor will use the local UTC offset if it can not find any information in Format (%z or %s). You can use this parameter to set customized offset, such as -28800 for UTC-8. Examples: 1. 2016/01/02 12:59:59 doesn't have offset information, assume as UTC0
- Default: set to local offset (UTC+8), get 2016/01/02 12:59:59 +0800.
- Set to UTC-8 (-28800): get 2016/01/02 12:59:59 -0800.
2. 2016/01/02 12:59:59 +0700 have offset information => 2016/01/02 05:59:59 +0000
- Default: if local offset is UTC+8, get 2016/01/02 13:59:59 +0800.
- Set to UTC-8 (-28800): get 2016/01/02 05:59:59 -0800.
Click to show internal directories.
Click to hide internal directories.