Log4bash: Logging for Linux Shell

Apr 28, 2009

With version 1.0, log4bash makes its first appearance in providing logging functions for shell scripts.

With version 1.0, log4bash makes its first appearance in providing logging functions for shell scripts.

The open source project is itself a bash script tailored for the GNU project shell. Developer Philip Paterson recommends the log4sh logging framework for users of other UNIX shells.

Log4bash uses the log4j Java framework as model and allows creation of easy to read and parse log files from bash scripts. It provides six log levels from FATAL to DEBUG and can display logging output to the screen along with log files. The documentation includes a working sample script.

Log4bash is under LGPL 2.1 and available for download from the project page.

Related content

  • Bash vs. Vista PowerShell

    Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?

  • Bash Completion 1.1 Adds Shell Functionality

    The Bash shell has long supported extending command completion through scripts. The Bash-Completion package delivers full scripts for Linux commands and is currently available in version 1.1.

  • Command Line

    A few basic tricks can liven up the command line and add a dash of color to your console.

  • Bash 4

    Despite the Bourne-again shell's biblical age and high level of maturity, developers continue to work on it. We take a look at the latest Bash release.

  • SHC: Bash Script Compiler

    The Bash Shell Script Compiler converts shell scripts directly into binaries. Compiling your scripts provides protection against accidental changes, but you will have to contend with some quirks.

comments powered by Disqus

Issue 19: Linux Shell Handbook 5th Ed./Special Editions

Buy this issue as a PDF

Digital Issue: Price $15.99
(incl. VAT)


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia