>

Bug Happens...

Every developer knows that. The bad thing is that if you want to see what happened, more often than not you have to crawl between hundred lines log files, written in a format which is all but human friendly.





That's why LogHappens exists!

LogHappens aims to fix exactly this. It's a simple tool, it will not prevent you from writing bugs, but it will notify you immediately when something has been logged by your web server or your favorite framework.

Does it handle different log formats?

Of course it does. Every software has its own bugs, and every software has its own way of logging things too. This is why I have tried to make it as simple as possible to let you create your own routine for reading log files, while still providing a few log default parsers that you can immediately use.

What does it look like?

It looks like this, but you can change the appearance by using any of the bootstrap/bootswatch themes!

A screenshot of the LogHappens interface

Did I mention it's free?

Because it is. Free and Open Source. I'm enjoying a lot of Open Source Software, that's why I've decided to give something back.

How do I add a log file to be tracked?

Adding a new file to be tracked is fairly simple with LogHappens. Just add a new record in your config.json file, and set the values according to your preferences. Something like this is enough.


"apache": {
    "icon": "logos:apache",
    "color": "#104B73",
    "title": "Apache error",
    "file": "/var/log/apache2/error.log",
    "parser": "apache24"
}
                    

Can I track a remote file (I.E. through a URL)?

If you are not worried for the security issues of having an error log publicly reachable, then yes. Just set the URL in the configuration path.


"myExampleSite": {
    "icon": "wpf-online",
    "color": "#104B73",
    "title": "My ExampleSite Errors",
    "file": "https://example.com/logs/error.log",
    "parser": "cakephp3"
}
                    

Can I capture the browser's JavaScript errors too?

Yes sir! Even though it is not a LogHappens specific function you could use something like this to capture client side JavaScript errors

How are the log files parsed?

It's essentially quite simple. Take a look at the files contained in the "parsers" directory to have a glance on how it works.

If you need to view logs for another framework, those examples could be good "hello world" templates too :)

Can I share a new parser file?

Of course! As you can see, there are apache24, CakePHP 3.x and CodeIgniter files in the parsers folder. If you have created your own routine, please send it to me, I will be more than happy to add it to the provided parsers!

Download & Installation

To install LogHappens, please follow these steps:

  • Get LogHappens (choose your favourite method):
  • Place LogHappens in a folder executable by apache or ngnix
  • Duplicate the file "config.default.json" to "config.json"
  • Open your new "config.json" and edit as you need. You can add new log files by simply adding new records there.
  • Open the browser to the destination you have installed LogHappens
  • Enjoy!