ELOG - Syntax of elogd.cfg  

Global and individual logbook options for an ELOG server

The configuration file elogd.cfg contains entries which define the structure of logbooks and the behaviour of elogd. The file has a simple ASCII format. Each logbook is defined by a [<name>] section where <name> is the name of the logbook. The [global] section is used for settings common to all logbooks. Each line contains a setting name, followed by an equal sign and the value for this setting. Lines starting with ";" are treated as comments.

Here is a simple example, which define two logbooks, "Linux" and "PC":


  Global options  

The notation of the following options is such that items enclosed by "<" and ">" should be replaced by a specific string. If a value contains blanks (like a complete sentence), it should not be enclosed in quotation marks.

If a setting has a number of possible options, they are shown in the form option1|option2|..., meaning that one of the options (without any vertical bar) should be used. The following options are specific to the [global] section:


  Individual logbook options  

For each logbook, there is a section with the logbook name in square brackets, so that each logbook can have different options. If an option is not present in a logbook section, then the system tries to locate that option in the [global] section. Thus if the following options are placed in the [global] section, they are defaults for all logbooks. If they are present in the [global] and in the logbook section, the logbook option is used.

Here are the available options, by broad categories:


  General options  

  Attributes  

  Access control  

Reading and writing into logbooks can be constrained using two different access methods, either with global passwords for read, write and admin (config, delete), or with user- level passwords. For these two schemes to work properly, cookies have to be turned on in your browser. Please consult your browser documentation about how to do that.

These optional password statements define passwords for reading and writing to the logbook, to delete entries in the logbook and to configure a logbook via the Config menu. The passwords are stored in an encoded form. To change them, use elogd directly with the -r , -w and -a flags. To set the write password of logbook "linux" to " test", enter:

The read password is queried by the browser with a pop-up window and usually stays active for the entire browser session. The write and admin passwords are stored in cookies on the browser side and expire after the browser session. This time can be changed with the statement Write Password Expiration = x or Admin Password Expiration = x, where x is the expiration time in hours. It should be noted that on some systems the daylight savings time is calculated incorrectly, which can cause time offsets of one hour between a server PC and a client PC. In this case one hour must be added to the expiration time. If the expiration is set to "0", which is the default, the passwords are kept for the current browser session only. When the browser is restarted, the password must be re-entered.

An alternative to the read/write/admin passwords is the user level access with a password file. This file contains user names and passwords in following format:

The passwords are encoded. New users can either be created by hitting Register as new user on the login page if Self register = 1 in the configuration file, or by the admin user in the Config page by pressing New user. When a user is logged it, the entry for this user can be modified via the Config command. The admin user can also change entries for other users.

The presence of a password file requires all users to "log in" using their name and password, except when a guest login is allowed via the "Guest menu commands" option. An additional advantage of this method is that the user name can be used as an attribute value for creating logbook entries. For example, the following line could be added to the configuration file to fill in the Author and the Email attributes with the current user name and email:

Thus the author name is not user-input anymore, ensuring the entry always contains the actual user name. For a full listing of substitutions, see the "Subst <attrib>" option.

The user name and password are stored as cookies on the user side. They expire after the current browser session by default, which can be changed with the Login expiration option, giving the expiration time in hours. Setting this to 24 for example, makes the password expire after one day.

With this option it is possible for new users to self-register an user account. At the login page, a link is displayed "Register as a new user" which leads the user to a configuration page where one can enter the account name, full name and email address. A flag allows for automatic email notification on new entries on the logbook. These settings can later be changed with the Config menu command.

Setting this option to 0 disables self registration. With option 1, users can silently register, while setting it to 2 causes elogd to send an email notification to the admin user(s). The option 3 is used to only send an email notification to tha admin users(s), which then can validate the account and commit it by hitting the URL given in the email notification.

Commands can be restricted to certain login names (separated by commas). For each command in the list defined with the "Menu commands" option, a list of user names can be specified, which are allowed to execute that command. If the allow option is not present, all users may execute that command by default.

These two settings can be used to restrict the access to the logbook to certain computers. It is similar to the UNIX hosts.allow and hosts.deny files. The list can consist of individual host names or IP numbers, subnet masks like 123.213. (note the trailing '.') or .mit.edu, or the word All. The following rules are applied:

These rules are applied before any password is checked. To debug problems, start elogd with the "-v" flag, in which case the rule checking is printed on the screen.

The global option Logfile = <filename> can be specified to log all user login/logout activities plus all successful user connections.

If any of the password statements are in the [global] area of the configuration files, they are used for all logbooks. If one logs in at one logbook, access is automaticlly granted to all logbooks. If the password statements are in the individual logbook sections, one has to log in to each logbook separately.


  EMail notification  

To send email automatically when new entries are created in a logbook, a SMTP host = entry must be present in the [global] section of the configuration file. To submit an email based on an attribute value, use the statement Email <attribute> <value> = <list>. Whenever an entry is submitted where attribute is equal to value, an email notification is sent to the email addresses in list. Several mail addresses may be supplied, separated by commas. Multiple Email xxx statements may occur in a configuration file. If either the attribute or the value contains one or more blanks the string must be enclosed with quotation marks, as in:

The statement Email All = <list> sends an email notification independent of the type and category. The Use Email Subject = <string> statement specifies which text is used as the email subject. The text can contain $<attribute> statements which are substituted with the current value of that attribute. For a full list of possible substitutions, see the "Subst <attribute>" option. The option Use Email From = <string> is used for the "from" field in the email.


  Flags  


  Themes  

Themes are layout and color schemes which determine the look and feel of a logbook. Each theme resides in a separate subdirectory and is specified with the theme = <dir> option in the configuration file. The directory contains the file theme.cfg and a few images, which are used for the title banner and the browse buttons. A default theme is contained in the distribution. If new themes are developed by users, they can be sent back to the author, to be included in future releases.

Most of the options in the theme.cfg are self-explanatory. The colors are coded as #RRGGBB, where RR is a 8-bit hexadecimal value for the red part, GG for the green and BB for the blue part, repectively. Since theme configuration files are re-read at each access, the elogd daemon does not have to be restarted after a change in the theme configuration file.

These two images display the same logbook entry using different themes: