Report browser module to look at error logger reports. #263

Closed
mmzeeman opened this Issue Nov 17, 2011 · 3 comments

Projects

None yet

3 participants

@mmzeeman
Member

It would be really nice if non-erlang-savvy administrators could easily look at the error reports written by the error logger handler log_mf_h. Especially because the zotonic.log and sasl.log files are overwritten after a restart. The reports in log_mf_h are crash protected.

Now you can access them like this:

  • start up an erlang shell in the log directory,
  • application:start(sasl).
  • rb:start([{report_dir, "./log_mf_h"}]).
  • rb:list().
  • rb:show(N).

A (simple) browser interface would be perfect.

@kaos
Member
kaos commented Nov 22, 2011

It won't be /that/ simple, since you need to capture the io output from rb to push it to a page.
That, or have rb redirect it's output to a file, and cat that to the page (rather ugly solution, imho).

A cleaner solution would be to simply copy the rb code for parsing the log files directly into a zotonic module (or model).

I've looked at the first approach, redirecting the io. That's actually quite doable. I've begun work on a mod_io_server, which will bridge the IO protocol and signals (from mod_signal).

@mmzeeman
Member

Didn't look at it yet. I was hoping, ehh no expecting, the parsing code from rb would be exposed already.Copying and pasting code doesn't sound very modular.

Wow, but mod_io_server sounds really cool and would work for a lot more.

@kaos
Member
kaos commented Nov 22, 2011

Yeah, I was expecting to be able to get the report list from rb too... but no :/

Having io bridged to signals means we can implement our own web page based erlang shell... :)
Which I've been thinking about too, for a while...

Update

Pushed my initial, only compiled, mod_io_server module to my fork.

More to follow... but not tonight ;-)

Update 2

It is now capturing io output, sending them on as put_chars signals!

@mworrell mworrell closed this Apr 22, 2015
@mworrell mworrell removed the enhancement label Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment