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

Simple Logging Class #2

Closed
wants to merge 3 commits into from
Closed

Simple Logging Class #2

wants to merge 3 commits into from

Conversation

mrb
Copy link
Contributor

@mrb mrb commented Jan 1, 2011

Hey There:

Your project is coming along nicely! Thanks for working on this, it's something that's been needed for a while. I had some free time and I'm trying to get my "C" back after a long time, so I put together this simple logging class that is only partially formed and dropped it into the project. Maybe it will be of use to you or maybe not, but I thought you'd like to check it out.

Mike

@nicolasff
Copy link
Owner

Hello Michael,

Thanks a lot for this first contribution, I'd say it's a pretty good start! I'll merge this tomorrow and work a little more on it, a few things need to be changed before it's pushed:

  • There is no need to copy body into msg, as msg has a fixed size and could overflow. We're writing it directly anyway, so body might as well be passed to printf.
  • I'm not sure why Redis is opening and closing that file in each call, it could be opened once.
  • There needs to be a log level filtering like in Redis, writing each request to the log would be too slow. Performance would drop with a fflush after each request too, I'll have to see what can be done about that.

Please feel free to suggest anything, not just items that are on the todo/ideas list. It's a young project and there is certainly a lot of things to do; I'm mostly adding what I think is interesting, and listening to possible users. The code base is small enough that a lot of features can be added or changed quickly.

You have already included a log level, and if you feel that some items could go to a different level because it's too verbose, feel free to just open a ticket. Same goes for log files, maybe there could be a different log file for HTTP requests? All suggestions welcome :-)

Cheers,
Nicolas

@mrb
Copy link
Contributor Author

mrb commented Jan 2, 2011

Nicolas,

Thanks! I'll implement a couple of your suggestions as I can and push again. Do you think you want to specify the server verbosity in the config file? I can include that as well.

In terms of what to log where, I'm totally open.

Mike

This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

2 participants