LaboratoryForPlayfulComputation / blockytalky

A toolkit for learning CS through networked physical computing
BSD 2-Clause "Simplified" License
28 stars 7 forks source link

Make a generic logger wrapper for reusablity #27

Open mpahrens opened 8 years ago

mpahrens commented 8 years ago

Make a generic logger wrapper that publishes DSL compiler info, warning, and error messages to the logger (always) and the endpoint.broadcast on the usercode_channel (only if endpoint is running).

This is so that we can use the DSL and the API functions as a library even if the webserver isn't running. That is, if we are embedding blockytalky in another application

mpahrens commented 8 years ago

I was thinking about this again today. It would be nice to add a logger that:

bennytheshap commented 8 years ago

That would be great. Is there a way to write it such that it could be more generic than BlockyTalky? i.e., that Elixir devs in general might want to use?

Ben

On Jan 7, 2016, at 8:51 AM, Matthew Ahrens notifications@github.com wrote:

I was thinking about this again today. It would be nice to add a logger that:

knows how and when to publish to the client gui if Enpoint.server is true in prod or dev. writes Logs to a custom log file (in /opt/blockytalky, but make it flexible using Application.app_dir at runtime), but only if env is prod. — Reply to this email directly or view it on GitHub https://github.com/LaboratoryForPlayfulComputation/blockytalky/issues/27#issuecomment-169704040.

mpahrens commented 8 years ago

Probably not, the generic logger is pretty well developed, even ones using channels On Jan 7, 2016 10:58 AM, "Ben Shapiro" notifications@github.com wrote:

That would be great. Is there a way to write it such that it could be more generic than BlockyTalky? i.e., that Elixir devs in general might want to use?

Ben

On Jan 7, 2016, at 8:51 AM, Matthew Ahrens notifications@github.com wrote:

I was thinking about this again today. It would be nice to add a logger that:

knows how and when to publish to the client gui if Enpoint.server is true in prod or dev. writes Logs to a custom log file (in /opt/blockytalky, but make it flexible using Application.app_dir at runtime), but only if env is prod. — Reply to this email directly or view it on GitHub < https://github.com/LaboratoryForPlayfulComputation/blockytalky/issues/27#issuecomment-169704040 .

— Reply to this email directly or view it on GitHub https://github.com/LaboratoryForPlayfulComputation/blockytalky/issues/27#issuecomment-169706438 .