Git Product home page Git Product logo

gonx's Issues

int conversion in format??

I try figure out why

file := strings.NewReader(`37.219.240.1 [05/Nov/2014:02:15:54 +0200] test.fi "GET / HTTP/1.1"`)
format := `$remote_addr [$time_local] $host "$request" `

Ok.

file := strings.NewReader(`37.219.240.1 [05/Nov/2014:02:15:54 +0200] test.fi "GET / HTTP/1.1" 200`)
format := `$remote_addr [$time_local] $host "$request"  $status`

Don't work.

From other side

file := strings.NewReader(`37.219.240.1 [05/Nov/2014:02:15:54 +0200] test.fi "GET / HTTP/1.1" "200"`)
format := `$remote_addr [$time_local] $host "$request"  "$status"`

OK?

Gzipped files

Hello,

(Love your project, great work !!)
I am not able to use the gonx.NewReader on a compress/gzip Reader.
It seems to not be able to read and return 0 lines.

Did you ever tried? Do you have any idea of the problem?
**Nevermind, it work flawlessly, you can delete this issue **

Thanks

Separate benchmark and examples

Hey @satyrius,

  • Currently, we are having multiple modules inside one repo which will not allow us to build in GitHub action.
  • We can rewrite the benchmark as part of testing, and examples will be covered in the readme file.
  • After that we can use the GitHub action for the test case.

Let me know your thoughts on this!

I would like it to take it further

The NewChain duplicate reducers

func NewChain(reducers ...Reducer) *Chain {
    chain := &Chain{
        reducers: reducers,
    }
    for _, r := range reducers {
        if f, ok := interface{}(r).(Filter); ok {
            chain.filters = append(chain.filters, f)
        } else {
            chain.reducers = append(chain.reducers, r)
        }
    }
    return chain
}

Is this your original mean?

Can't parse if agent is empty

If there is a line in nginx log with empty user agent it fails with a message like this:

panic: Access log line 'xx.xx.xx.xx - [21/Apr/2014:06:25:10 +0000] "GET / HTTP/1.0" 200 15389 "-" ""' does not match given format '^(?P<remote_addr>[^ ]+) - [(?P<time_local>[^]]+)] "(?P[^ ]+) (?P[^ ]+) (?P[^"]+)" (?P[^ ]+) (?P[^ ]+) "(?P[^"]+)" "(?P[^"]+)"$'

Regarding donating project

Hello @satyrius, thanks for this amazing project. Hope you're doing well

We(as a team) have created a GitHub org called daftcreations for OSS projects and for educations content on YouTube. All members were colleagues once. The thought of creating org was from using day to day life tools, most of the themes were the open-source or some part of them. I, Myself, have contributed to many OSS projects and most of the members of org members as well. We got a team of awesome Designers, UI, UX, Frontend, Backend, ChainOps(blockchain DevOps like myself) and DevOps people. And that inspires us to contribute our expertise to the open-source world, and make it better. This is the way.

We jointly created our first project called gcps which is gcloud profile switcher, which was initiated by @naman2706 and other devs, we're just on the edge of releasing it.

So, We wanted you to donate(transfer) this awesome project to our org. Our amazing golang dev @aman00323 and @naman2706 will look into it and try to give it a new life with the latest golang knowledge.

Fin

Row order

Is there any way to get the row line ?

I was playing around, however I really need the row number, and currently thats not possible since the reader is no sync.

Log entry format

Hello,

I'm trying to process entries with fileds separated by either spaces (one or more) or tabs.

Is it possible to somehow specify such cases in the format string? If not, I could try to implement some FieldsParser (based on https://golang.org/pkg/strings/#Fields). Would you be interested in such pull request?

Thanks

Use of regexp.QuoteMeta in NewParser function causes problem with my nginx.conf

My nginx.conf includes following definition of log format (sorry for bad formatting):

log_format log_with_cookie '[$time_local]\t'
         '$remote_addr\t'
        '$geoip_country_code\t'
        '$msec\t'
        '$remote_user\t'
        '"$request"\t'
        '$status\t'
         '$body_bytes_sent\t'
         '$cookie_uid\t'
         '$uid_got\t'
        '$uid_set\t'
        '$cookie_u\t'
        '"$http_accept_language"\t'
         '$cookie_c\t'
         '"$http_user_agent"\t'
         '"$http_referer"\t'
         '"$args"\t'
    '"$sent_http_set_cookie"';

Because of use of regexp.QuoteMeta in NewParser function, tab characters are not properly recognized during parsing.

Is there some particular reason why it is done this way?

Space between IP Addresses in $http_x_forwarded_for

Nginx's $http_x_forwarded_for can contain multiple IP addresses (in cases where a reverse proxy is used). In such cases the format used is [IP Address]([Comma][Space][IP Address])+. I guess since this value is gotten from the X-Forwarded-For header.

Gonx is able to parse [IP Address]([Comma][Space][IP Address])+ but not [IP Address]([Comma][IP Address])+.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.