Documentation ¶
Index ¶
- Constants
- type Line
- func (l Line) ContentType() string
- func (l Line) Datetime(scan *Scanner) (time.Time, error)
- func (l Line) HTTP() string
- func (l Line) Host() string
- func (l Line) Line() string
- func (l Line) LineNo() uint64
- func (l Line) Method() string
- func (l Line) Path() string
- func (l Line) Query() string
- func (l Line) Referrer() string
- func (l Line) RemoteAddr() string
- func (l Line) Size() int
- func (l Line) Status() int
- func (l Line) Timing() time.Duration
- func (l Line) UserAgent() string
- func (l Line) XForwardedFor() string
- type Scanner
Constants ¶
View Source
const ( // Combined format; used by default in Apache, nginx. // // 127.0.0.1 user - [10/Oct/2000:13:55:36 -0700] "GET /path HTTP/1.1" 200 2326 "https://ref" "Mozilla/5.0" // $remote_addr $ignore [$datetime] "$method $path $http" $status $size "$referrer" "$user_agent" Combined = `$remote_addr $ignore [$datetime] "$method $path $http" $status $size "$referrer" "$user_agent"` CombinedVhost = `$host:` + Combined // Common log format. // // 127.0.0.1 user - [10/Oct/2000:13:55:36 -0700] "GET /path HTTP/1.1" 200 2326 // $remote_addr $ignore [$datetime] "$method $path $http" $status $size` Common = `$remote_addr $ignore [$datetime] "$method $path $http" $status $size` CommonVhost = `$host:` + Common )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewFollow ¶
func NewFollow(ctx context.Context, file, format, date, tyme, datetime string, exclude []string) (*Scanner, error)
NewFollow follows a file for new lines and processes them. Existing lines are not processed.
func (Scanner) DateFormats ¶
func (Scanner) MatchExcludes ¶
Click to show internal directories.
Click to hide internal directories.