Improvements in the Report Browser

Videla Alvaro videlalvaro@REDACTED
Sun Dec 20 11:10:48 CET 2009


Hi,

I'm new in this mailing list and I'm learning Erlang since 1 year. 

At the moment I'm working on a system that will do heavy use of the error_logger and the report browser. After collecting some reports I would like to filter them based on certain criteria, but I saw that the rb module only supports rb:grep/1 for filtering, so I started tweaking the module, adding some functionality. At the same time I discovered that the compiler throws this warning when I was compiling my tweaked module:

Warning: regexp:match/2: the regexp module is deprecated (will be removed in R15A); use the re module instead

I got that partially fixed by adding a new function re/1 that accepts a compiled regular expression obtained by re:compile/1 or re:compile/2. rb:re/1 can be used in place of re:grep/1 which I didn't want to remove since it may break other people code.

Also I added a couple of functions

filter/1 expects a list of filters that can be applied to the reports _only_ if our reports are proplists. (I can explain it further in another email if you want)

reports/0 and reports/1 expect an optional list of filters. The function returns a list of reports instead of printing them to the screen. I'm planning to build a webmachine application to browse the reports, that's why I need that feature.

Please let me know if you think any of this functions can be contributed back to the rb module.

Regards,

Alvaro


More information about the erlang-patches mailing list