Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fields within quotes not handled #1

Open
jamienz opened this issue Sep 16, 2015 · 1 comment
Open

Multiple fields within quotes not handled #1

jamienz opened this issue Sep 16, 2015 · 1 comment

Comments

@jamienz
Copy link

jamienz commented Sep 16, 2015

Alpine successfully handles a log format with a single field inside quotes, e.g.

var alpine = new Alpine("\"%h\"");

However it doesn't like it if the log format has multiple fields inside the same set of quotes, e.g.

var alpine = new Alpine("\"%h %h\"");

I believe having multiple fields inside the same set of quotes is a valid scenario.

The stacktrace:

S:\dev\scratch\node_modules\alpine\alpine.js:110
            throw new Error("Field does not start with %: "+field);
            ^

Error: Field does not start with %: "%h
    at parseLogFormat (S:\dev\scratch\node_modules\alpine\alpine.js:110:19)
    at setLogFormat (S:\dev\scratch\node_modules\alpine\alpine.js:65:25)
    at new Alpine (S:\dev\scratch\node_modules\alpine\alpine.js:25:14)
    at Object.<anonymous> (S:\dev\scratch\selflog2sp.js:4:14)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
@musicin3d
Copy link

+1 AWS ELB logs include method, url, and protocol within the same quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants