On 20/02/2014 13:53, Yuri K. Shatroff wrote: > I don't need such 'solutions' to non-existent problems. But if there > were a *real* necessity to pretty-print a log's tail in service status, > I think it would have been a matter of a proper setup (i.e. the service > using syslog, hence a defined log format) and not a heck more complicated. > >> Definetly not a 5-minutes job. > > 5 minutes is even too much to type sort of > tail -${LINES} ${SERVICE}.log > if you know where to look up LINES and SERVICE.
You've never actually tried this, right? Your idea instantly fails as the rc-service author has no idea of what you defined ${SERVICE} to be and no way to determine what it is now. How are you going to deal with the situation with a big busy daemon that immediately starts serving requests when started (i.e. with very little delay)? By the time grep, sed, awk and friends have gotten around to making their way through a log file of varying size, the entries that apply to restart can easy be many hundreds of log lines prior. I have done this, and it does not work. I got a result and it's relaible, but you don't want to know what it took. It's also highly customized and useless to anything other than my highly customized setup. -- Alan McKinnon alan.mckin...@gmail.com