Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am developing a rails and scala application that uses MySQL, Redis, MongoDB and memcached on OSX.

It is rather annoying to always have 6 terminals open and go through the logs there, so I was wondering if there is a tool that allows me to launch the programs and then grab the stdout / log to socket (or logfile tail if that is the only output) and aggregate it with prefixes for the origin

[MySQL        - 00pid00] SELECT .......
[Rails Server - 11pid11] GET request to /foo
...

Ideally I can also sort and filter like Apache Chainsaw allows for log4j and create my own fields based on regex (i.e. when there is an error, show me a field that only displays the URL of the error and the HTTP response / file + line that caused the error.

(I know sed awk grep and co, but a GUI is much easier to use and much faster to get started with)

share|improve this question

2 Answers 2

up vote 0 down vote accepted

If you can set up each of those systems to log to files, you can tail those logs from Chainsaw and aggregate the log entries into a single table. Here's how:

  • Pull down the latest developer snapshot of Chainsaw: http://people.apache.org/~sdeboy
  • Select the 'Welcome' tab and click the 'View example receiver configuration' button at the top of the tab and copy the configuration -Create a number of VFSLogFilePatternReceiver entries, one for each log file you are going to tail.
  • Once all of your log files are showing up in Chainsaw as separate tabs, you can collect all events from all tabs in a new tab by defining an expression which matches the events you'd like to see (see Help/Tutorial for documentation on expression syntax).
    • Hint: clear and pause the chainsaw-log tab (from the 'current tab' menu) in order to make sure chainsaw log messages aren't mixed in with yours
    • Select 'view, create tab from expression'
    • The simplest expression which will match all entries in all tabs is MSG EXISTS
    • a new tab with your expression will be created and populated with all existing events matching the expression
    • as new events arrive which match the expression, they will be added to the original tab as well as the expression tab
share|improve this answer
    
Nice, I will take a look at that! Thanks –  mmlac Jun 7 '13 at 4:02

You can add your own log files to the standard /Applications/Utilities/Console.app

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.