ELOG Electronic Logbook Home Page

by Stefan Ritt

Current version: 1.3.1

There is also a project page on   SourceForge Logo and another one on  

  • Introduction
  • Download
  • Installation
  • Configuration
  • Syntax of Elogd.cfg
  • How it works
  • FAQs (Frequently asked questions)


    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 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 attributes for message. The logbook can then be searched using these attributes. The right pane on the left image shows a search for all messages of with attribute "Type" equal to "Configuration", and the lower pane shows the search result. It is also possible to use full-text search in attributes and the message body.

    While logbook entries are usually displayed one entry per page, they can also be listed consecutively which makes it easily possible to produce a paper 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 after it has been submitted.

    An additional feature is the automatic generation of a notification email messages based on a certain type or category of a logbook entry.

    The features of ELOG make it useful for several applications:

    A demo installation has been set up so one can see how all this works in an online environment.


    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 something 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.

    The distribution contains a sample configuration file elogd.cfg and a demo logbook in the demo subdirectory. If the elogd server is started in the elogd-x.x.x directory, the demo logbook can be directly accessed with a browser by specifying the URL http://localhost:8080 (or on whatever port you started the elog daemon). If the elogd server is started in some other directory, one has to specify the full path of the elogd.cfg file with the "-c" flag and has to change the Data dir = option in the configuration file to a full path like /usr/local/elogdata.


    It was reported by Martin Huber that under Solaris 7 following command must be used to compile elog:

    gcc -L/usr/lib/ -ldl -lresolv -lm -ldl -lnsl -lsocket elogd.c -o elogd

    It was also reported that the keep-alive mechanism is not working under some Solaris systems, so you need to start the elogd server with the "-k" flag to turn keep-alives off.

    Windows installation

    Download and execute the elogxxx.exe file. The installer puts the ELOG system into a directory you specify and adds some menu shortcuts. With these shortcuts, the daemon elogd.exe can be started directly and the demo logbook can be accessed with the browser. 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, which is not possible on Windows 95/98/ME. To do so, one needs the programs srvany.exe and instsrv.exe from the Windows Resource Kit. If you don't have the Resource Kit, these programs can probably be downloaded from various places like this.. Then follow these steps:

    1. Copy SRVANY.EXE to %window%\system32\.
    2. Use INSTSRV to install SRVANY.EXE as a service named "elogd":

      INSTSRV ELogd %windir%\system32\srvany.exe
    3. Run REGEDIT and find "My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\elogd".
    4. Under the Elogd registry key, create a new key called Parameters via Edit/New/Key.
    5. Under the new key Parameters, create the following three STRING values:
      • Application set to "c:\elog\elogd.exe" (or wherever you installed the elogd program)
      • AppDirectory set to "c:\elog" (or wherever you installed the elogd.cfg file)
      • AppParameters set to "-p 8080" (or any other port which you would like to use, put an empty string for port 80)
    6. Under NT4, open the Services entry in the control panel, under Windows 2000 right-click on "My Computer", click to "Manage", select "Services and Applications", expand it and select "Services". On the right panel, double-click "ELogd". Then start the service manually and change the startup type to "Automatic". This way the elogd program gets started automatically on every reboot.
    Test the service by accessing your logbook via your browser.

    An alternative to the SRVANY program is the free FireDaemon Utility (thanks to Fred Pacquier). Make sure elogd is not running, then start the FireDaemonUI application, and enter following fields:

    Service name: ELogd
    Service description: "Electronic Logbook Daemon"
    Startup type: Automatic
    Interact with desktop: off
    Start immediately: on
    Auto restart application: off
    Application working directory: c:\program files\elog\ (or wherever you installed elog)
    Application executable: c:\program files\elog\elogd.exe (or wherever you installed elogd.exe)
    and keep the other options as they are. After pressing "OK" the daemon should be started immediately.


    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). Note to specify the full path for the elogd.cfg file when started as a daemon.

    To test the daemon, connect to your host via


    If port 80 is used, the port can be omitted in the URL. If several logbooks are defined on a host, they can be specified in teh URL like

    where <logbook> is the name of the logbook.

    The contents of the configuration file elogd.cfg are described on a separate page.

    Secure connections

    Although the elogd progream does not support secure connections over SSL directly, it is possible to use it together with stunnel to do so. Three steps are necessary:
    1. Start elogd. If another Web server is running on port 80, use a different port.

    2. Install the stunnel program if not already done and start it with:

      stunnel -d 443 -r your.host.name:80
      Substitute the port 80 if you started elgod on another port. This causes stunnel to receive requests on the https port 443 and forwards them to the elogd port.

    3. Connect to your logbook with a browser which supports SSL via:

    Alternatively, one can access elogd through a SSH tunnel. To do so, open an SSH tunnel like:

    ssh -L 1234:your.server.name:8080 your.server.name
    This opens a secure tunnel from your local host, port 1234, to the server host where the elogd daemon is running on port 8080. Now you can access http://localhost:1234 from your browser and reach elogd in a secure way.

    Submitting pages via the Web

    New logbook entries are submitted by pressing the New button in the ELOG display page. This opens a form where one can enter the author, type, category, subject, text and optional attachments.

    It is possible to submit the text as HTML text, so one can put HTML formatting tags inside the text. Note that one then needs the tag <P> tag to start a new paragraph.

    Attachments can be submitted similar to email attachments. Enter the file name or push the Browse button to select a local file. This file gets submitted into the logbook. If it is a picture (GIF or JPEG), it gets displayed in the logbook page. Otherwise only a link to the file inside the logbook is shown. By clicking at that link, the original file can be downloaded to the local hard disk again. This feature can be used to store things like Linux configuration files, which can then be retrieved easily without any copy and paste.

    It is possible to pre-populate the author, type, category and subject field. This can be useful if always the same author for example submits entries from one PC. In this case, she/he needs a bookmark of the form:

    If this bookmark is executed, the author field gets automatically pre-populated with "joe" and the type "Info" gets selected. The same is possible using pcategory and psubject. So one can define a set of bookmarks for certain types of logbook entries.

    Submitting pages via elog

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

    The password must match the write password defined on the server. If user level access is defined on the server (via the "password file =" option), a valid user name / password pair must be specified with the -u option.

    Multiple attributes can be specified as well as several attachments. The message text can be supplied directly at the command or 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 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, October 19th, 2001