ELOG Electronic Logbook Home Page

by Stefan Ritt
  • Introduction
  • Download
  • Installation
  • Configuration
  • How it works

    Introduction

    ELOG is an electronic logbook with a Web interface. It runs under MS Windows and UNIX and is under the GNU Public License.

    The logbook functionality is implemented by a single daemon elogd program which is written in C. It uses structured ASCII files to store logbook pages, which can be retrieved through any web browser. Logbook entries can either be entered with a command line program or through the Web interface. Since only forms and tables are used, no Java or Javascript are necessary, which makes the logbook display very fast.

    elog.gif One the left upper panel one can see a typicl logbook page displayd by Netscape Navigator. Each logbook page can contain up to three attachments in a similar way to emails. This makes it possible to store images or text files and retrieve them easily. One can for example attach an example configuration file which can later be copied to the local machine with the "Save As..." function of the Web browser.

    Several logbooks can be served though a single elogd daemon. Each logbook can use classes for message types and message categories. The logbook can then be queried using these classes. The right pane on the left image shows a query for all messages of type "Problem fixed". Of course it is also possible to use full-text search.

    While logbook entries are usually displayed one entry per page, they can also be listed consecutively as shown in the bottom page. This makes it easily possible to produce a printout of a logbook.

    Logbook pages can be edited or deleted. This feature can be turned off in the configuration file so that a logbook entries cannot be changed afterwards.

    The features of ELOG make it useful for several applications:

    Installation

    Currently ELOG has only been tested under Windows NT and Linux, but it might also run on other UNIXes.

    ELOG is part of the MIDAS data acquisition system, but it can also be downloaded separately.

    UNIX installation

    Expand the TAR file with tar -xzvf elog-x.x.tar.gz. This creates a subdirectory elog-x.x where x.x is the version number. In that directory execute make, which creates the executables elogd and elog . These executables can then be copied to a convenient place like /usr/local/bin or ~/bin. The daemon elogd can be started manually with

    where the -p flag specifies the port. Without the -p flag, the server uses the standard WWW port 80. Note that ports below 1024 can only be uses if elogd is started a root, or the "sticky bit" is set on the executable.

    If the program complains with somwthing like "cannot bind to port...", it could be that the network is not started on the Linux box. This can be checked with the /sbin/ifconfig program, which must show that eth0 is up and running.

    To start the daemon automatically, it can be run from the /etc/rc.d/init.d system. Please consult your distribution to find out how to do that. I use a script which I put under /etc/rc.d/init.d. Then I call

    which works fine under RedHat 6.x.

    NT installation

    Download and execute the elogxxx.exe file which expands to the two source files and the executables (do not omit the exe extension, it's necessary!). The daemon elogd.exe can be started directly. Under Windows, the ports below 1024 can be used without restriction. So if no web server is running on the same PC the ELOG daemon listens under the standard Web port 80.

    Under Windows NT/2000, elogd can be started also as a service. Contact the author for more details.

    Configuration

    An ELOG daemon can server multile logbooks. Logbooks are defined in the elogd.cfg file. If this file is not in the current directory where elogd is started, it can be specified via the command line parameter -c . Under UNIX, you would typically start the daemon with

    where the -D flag tells elogd to start as a daemon in the background (does not work under NT). Once the configuration file is changed, the daemon has to be restarted.

    The configuration file elogd.cfg has a simple ASCII format, here is an example:

    Each logbook is defined by a [<name>] section where <name> is the name of the logbook. Each logbook has a separate directory where the logbook entries are stored, which is controlled by the Data dir statement. Note that the directories must exist and must be writable by the elogd program.

    The Types and Categories define the classes of messages which can be entered and queried in a logbook. The optional Write password and Read Password statements contain the password in an encoded form. To change them, one can use elogd directly with the -r and -w flags. To set the write password of logbook "linux" to "test", on would enter:

    Following additional flags are avaliable in the configuration file:

    Submitting pages via elog

    In addition of submitting logbook entries through the Web interface, a standalone program elog can be used. The parameters are:

    If some of the parameters are not supplied, they are asked for interactively. The message text can be entered directly. If the EDITOR environment variable is set, the specified editor is used. Alternatively, the message text can be submitted from a file with the -m flag.

    The elog program makes it possible to submit logbook entries automatically by the system or from scripts. In some shift logbooks this feature is used to enter alarm messages automatically into the logbook.

    How does it works

    The concept of ELOG is very simple. The elogd daemon contains an integrated full Web server which does not serve files like standard Web servers, but reads logbook entries from its database and formats them into HTML. Since only forms and tables are used, no Java or Javascript is necessary. The system does not use any images on purpose to reduce the amount of data to be transferred. Since the ELOG daemon contains a Web server, no additional server like Apache is required.

    The database ELOG save messages is a plain ASCII format. One file is created for each day in the form YYMMDD.log where YY is the year, MM the montdh and DD the day. The only non-ASCII character is a form-feed at the end of each message. If one sends a log file directly to a printer, each message is therefore printed on a separate page. Note that the log files should not be edited manually, since this could invalidate the internal database structure (each header contains the message length in bytes which then would become wrong).

    If attachment are submitted, they are saved as separate files with the name YYMMDD_HHMMSS_name where in addition to the date the time is specified and name is the original file name of the attachment. To copy the database to another computer, only the *.log files and the attachment files need to be copied. To copy for example all files form March 2001, one can select them with 0103??.log and 0103??_*.

    Visits to this page since 23 May 2001:

    Stefan Ritt, May 23rd, 2001