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

Add a logging option #208

Open
dotnetCarpenter opened this issue Dec 16, 2017 · 7 comments
Open

Add a logging option #208

dotnetCarpenter opened this issue Dec 16, 2017 · 7 comments

Comments

@dotnetCarpenter
Copy link
Collaborator

I don't know if I'm the only one who needs this, but because ecstatic is my main development server, I often wish I could see the requests in the console. I would like to be able to enable it with a simple CLI flag.

For log format I was thinking something like https://en.wikipedia.org/wiki/Common_Log_Format

@jfhbrook
Copy link
Owner

Yeah I could get behind a simple CLF-based logging format

@dotnetCarpenter dotnetCarpenter mentioned this issue Dec 16, 2017
4 tasks
@mk-pmb
Copy link
Contributor

mk-pmb commented Feb 13, 2018

How about we integrate morgan? It offers a variety of log formats.

@dotnetCarpenter
Copy link
Collaborator Author

@mk-pmb interesting. I'll take a look

@mk-pmb
Copy link
Contributor

mk-pmb commented Feb 14, 2018

Example code for ecstatic stacked with logging.

@jfhbrook
Copy link
Owner

I think it's a reasonable stance to say that ecstatic's logging should be extremely lightweight and intended for stdout only. If this means pulling in a module this is OK, but should definitely not overengineer this. If a tiny custom class works just as well, we should consider that as well.

@mk-pmb
Copy link
Contributor

mk-pmb commented Feb 14, 2018

Alternatively, we could consider implementing a very light-weight sub-middleware chaining mechanism inside the middleware function we return, so people can plug whatever logging and more. (Yo dawg, I heard you like middleware…)

@jfhbrook
Copy link
Owner

idk about sub-middlewares (I've been toying with the idea of moving away from express middleware support for well over a year now anyway), but a log property on the existing middleware to hook onto would make a lot of sense.

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

3 participants