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] Logbook tabs = 1 Tab cellpadding = 2 SMTP host = mailsend.your.domain [Linux] Theme = default Comment = General linux tips and tricks Data dir = /usr/local/elog/linux Attributes = Author, Type, Category, Subject Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other Options Category = General, Hardware, Software, Network, Account, Other Options Author = Stefan, Linus, unknown Required Attributes = Author [PC] Comment = Database PC installations Data dir = /usr/local/elog/pc Attributes = Location, OS, Owner Options Location = Building1, Building2 Options OS = Linux, Windows ME, Windows 2000 Required Attributes = Location, Owner Email All = name@address, othername@otheraddress Use Mail Subject = Location
The following options are specific to the
If a language name is given (currently only "german" and "french" are supported out-of-the-box),
the system searches for a file named eloglang.<name> containing
string translations from English into that language. If you create a new translation file, please send it back to the author to be included in future distributions.
The online help for
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
Here are the available options, by broad categories:
If this option is not present, following default is used:
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
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
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. To create or change them, use the "Change
Password" menu point. To create a new user, edit the password file
manually and use an empty password (like "
The presence of a password file requires all users to "log in" using their name and
password. 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 attribute with the user name:
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 24
hours by default, which can be changed with the
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
These rules are applied before any password is checked. To debug problems,
start
The global option
If any of the password statements are in the
To send email automatically when new entries are created in a logbook, a
The statement
[global]
section:
Port
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded
via the '-p' command line flag.
Language = <name>
The language setting determines the language of the elogd
output. Not affected by this
setting are the configuration file options (they are always in English) and the
attribute names as well as the optional Menu commands. These have to be
translated manually in the configuration file.
elogd
is contained in the file eloghelp_xx.html where
xx are the first two letters of the language (like "en", "ge" and "fr"). For new languages, a new file of that type must be created as well.
Logbook Tabs = 0/1
This flag controls the display of "tabs" on top of the logbook page which
allow to quickly switch between logbooks.
Main Tab = <string>
If this option is present, an additional first tab is displayed which takes you back
to the main logbook selection page. The string
is used for the
contents of the tab.
Welcome Title
This optional HTML code gets displayed in the title of the logbook selection
page. It can contain images via <img src="welcome.gif">
.
These images must be in the same directory as the elodg.cfg file.
The following line is an example Welcome Title:
Welcome title = <img src="welcome.jpg"><p><font size=5 color=white>Welcome to our Elog</font>
This displays an image and a text below.
Page title = <string>
The string specified here is used for the title of the logbook selection page. It is also
used by most browsers for bookmark names.
Selection page = <file>
When this option is present, a user defined file is displayed instead of the logbook
selection page. This file must be in the same directory as the elogd
file. It can be completely customized in order to contain logos etc. As a template,
the standard selection page produced by elogd
can be used.
SMTP host
This defines the SMTP host needed to send automatic email notifications. The host
name you can get from your email program or your local system administrator.
Logfile
This option specifies a filename which logs all login/logout activities and
successful user connections for logbooks with user level access.URL
This URL is used in automatic email notifications to point back to the new message.
Usually, the elog daemon tries to obtain the URL from the "Referer" statement in the
HTTP header. If this is not correct (like if the domain name is missing), the URL used
to point back to the logbook can be overwritten by this statement. The URL has to
contain the port number if not the standard port 80 is used like
URL = http://host.domain:8080/
User
Group
The user and group to run the elogd daemon under when started by root.
[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.
Data dir
Each logbook has a separate directory where the logbook entries are stored, which
is controlled by this statement. Note that the directories must exist and must
be writable by the elogd
program.
Number Attachments
The number of attachments which can be submitted in one entry. May be zero if no
attachments are needed. Maximum is defined by MAX_ATTACHMENTS in elogd.c
(10 by default).
Comment
The comment is displayed on the logbook selection list. The selection list is
displayed if more than one logbook is defined on a host and no logbook is
explicitly specified in the URL.
Theme
A theme determines which layout and colors are used for a logbook, similar to
skins in other programs. The theme option points to a subdirectory
under the directory of the configuration file, which contains all files for
that theme. The format of these files is described under the Themes
section.
Date format = <string>
This option determines how the date of a logbook entry is displayed. The format
of the string is the same as the C function
strftime, so a string of %A, %B %d, %Y yields in a display of
Thursday, November 15, 2001 for example.
Welcome Page = <file>
By default, the last entry of a logbook is displayed when the logbook is selected.
This can be overridden with this option, which causes a HTML file to be shown
instead of the last message. This file can contain further links for new logbook
messages of for logbook queries. Here is a simple example of such a file:
<h1>Welcome to the test logbook</h1>
<ul>
<li><a href="?cmd=new">Enter</a> a new message
<li><a href="?cmd=find">Search</a> the logbook
</ul>
The file must be present in the same directory as the elogd
file.
Start page = <command>
This option can be used to display a different start page. command
can be either "last10" for the last ten messages, or an ELog menu command in the
form ?cmd=xxx
. To start with the search page, one uses
Start page = ?cmd=Find
Submit Page = <file>
This optional page can be displayed when a new message was submitted in a logbook.
Here is an example:
<h1>You successfully submitted a message</h1>
<a href="?cmd=Back">Back</a> to the logbook<p>
<a href="?cmd=New">Enter</a> another message
The file must be present in the same directory as the elogd
file.
Message comment
This optional comment is displayed on top of the text entry field when submitting
a new message. It can contain a sentence like "Please enter your message here:".
Menu commands = <list>
This option specifies the menu commands displayed on top of the logbook page. For
certain installations, it can be useful to disable some commands. Following
commands are possible:
Menu commands = New, Edit, Delete, Reply, Find, Last day, Last 10, Config, Help
Find Menu commands = <list>
This option specifies the menu commands displayed on top of the listing page
resulting from a "find" command. Although all commands from a above are possible,
only the commands New, Find, Back, Last day, Last 10, Last x, Config, Change
password, Logout
and Help
make sense. There is one
special command in addition to the above commands: The command Last x
gets expanded to "Last 2 days", "Last 4 days" or
"Last 20 entries", "Last 40 entries" and so on, similar to the standard
behaviour without the "Find Menu commands" option.
Bottom text = <file>
If this option is present, the HTML contents of file
is displayed at
the bottom of an Elog page instead of the little Elog home page link. It can contain for
example a link back to the main logbook selection page like:
<center><a href="/">Main page</a></center>
Or it can contain other useful links. The file must be present in the same directory
as the elogd
file.
Help URL
This URL is used for the Help button. By default, the file eloghelp_xx.html is
returned with the contents of the help page. Edit this file directly to add site-specific help for all logbooks. Alternatively, use the Help URL
option to specify different help pages for different logbooks.
It can point to a site-specific help page via http://...
or to a local file like
file://c:/tmp/config.html
, or to the name of an HTML file which must be present in the same directory as the elogd
file.
Message Width
This value sets the number of characters per line of the main message entry field.
The default value is 76 (78 for replies), and can be increased for installations
which need a larger window size (like pasting log files etc.).
Display mode
Default mode for search display can be "full", "summary"
and "threaded". On the find entry form, the checkboxes
are set accordingly. The "Last xxx" page used this setting directly.
Attributes = <list>
Define a number of attributes for the logbook. A maximum of 20 attributes can be
defined. Typical values are "Author", "Subject" or "Type".
Options <attribute> = <list>
Usually, an text field is used for an attribute, where the user can fill in
text of up to 100 characters. If instead a drop-down box with preset items is
better for a given attribute, these items can be defined with this statement.
Up to 100 items can be defined, separated by commas. To add an option including
a comma, encose it in quotations marks like
Options town = San Francisco, "Paris, Texas", "Paris, France"
MOptions <attribute> = <list>
This list allows for "Multiple Options", meaning that an attribute can have
several values simultaneously. When entering an entry with MOptions, each value
from the list is represented by a checkbox. Unlike with normal options, multiple
checkboxes can be checked for an entry. The attribue value then becomes
<value1> | <value2> | ...
In the "find" page only one of these values can be specified, which is then
treated as a substring in the search filter.
IOptions <attribute> = <list>
This list specifies a set of icons for an attribute. Some icons are contained in
the themes/default/icons directory which can be used here like
Attributes = Author, Icon, Subject...
IOptions Icon = icon1.gif, icon2.gif, icon3.gif, ...
New icons are welcome and should be sent back to the author to be incorporated
in the next version.
Options <attribute> = boolean
If an attribute is marked "boolean" this way, a checkbox is displayed for
this attribute.
Preset <attribute> = <string>
This option uses a preset string for an attribute. The string can contain
subsitutions like the ones described under the "Subst <attribute>"
command. One possible application is to use the login name for the author
field like:
Preset Author = $long_name
If the attribute should be locked at the Web submission, use the
"Locked Attributes = ..." option. If a preset value is given for an
attribute which has an options list, the preset value is selected in the drop
down box by default.
Preset text = <string> or <file>
This preset value is used for the main body text. It can be a string or a file,
which must be present in the same directory as the elogd
file.
Locked Attributes = <list>
The attributes specified here cannot be modified when a new entry is submitted.
This makes only sense for preset attributes.
Fixed Attributes = <list>
The attributes specified here cannot be modified when an existing entry
is modified via the Edit
button. This feature can be
useful to preserve the original author of the message, when using the
Preset Author = $long_name
option as described above.
Required Attributes = <list>
The attributes specified here are required when a new entry is submitted. The
attribute names are marked with * on the entry form.
Page title = <string>
The string specified here is used for the title of the web page. It is also
used by most browsers for bookmark names. The string can contain substitutions
as described unter the "Subst <attribute>" option.
Display search = <list>
Specified the display and order of items in a search result page. In addition
to all attributes, one can specify here "#" for the message ID, "Logbook"
and "Date". The restriction to certain attributes can be helpful if many
attributes are defined in a logbook, which usually makes the table too big to
fit in the browser. The default
is
Display search = #, Date, <all attributs>
Which displays the message number, date, and all attributes. The display of the
message body is controlled by the Display mode
and
Summary lines
options.
Thread display = <string>
Optional way to specify the line contents in the threaded search result. All
standard substitutions like as described in the Subst command can be
used here, like
Thread display = $author, $subject
Thread icon = <attribute>
If a logbook uses some icons for an attribute, these icons can be displayed
in the search result page instead of the default icons defined in the themes.cfg file.
Subst <attribute> = <string>
When submitting logbook entries, attribute values can be substituted by some
text. This text can contain arbitrary fixed text and following values:
elogd
is running
Following example use this feature to add the remote host name to the author:
Subst Author = $author from $remote_host
Remove on reply = <list>
This option clears one or more (separated by commata) attribute values from a logbook
entry when creating a reply to that entry. This can make sense for example for
the author, since the author of a reply can be different from the original author.
Subst on reply <attribute > = <string>
Substitution of attributes for replies. This option can be used to replace the current
subject with a "Re: <old subject>":
Subst on reply subject = Re: $subject
Read password
Write password
Admin password
Write password expiration = <hours>
Admin password expiration = <hours>
elogd
directly with the -r
, -w
and
-a
flags. To set the write password of logbook "linux" to "
test", enter: elogd -w test -l linux
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", the passwords are
kept for the current browser session only. When the browser is restarted, the password
must be re-entered.
Password file = <file>
Login expiration = <hours>
<login name1>:<password1>:<full name1>
<login name2>:<password2>:<full name2>
<login name3>:<password3>:<full name3>
...
<login name>::<full name>
"), which can then be changed via the "Change password" menu point.
Options Author = $long_name from $remote_host
Login expiration
options. If the expiration is set to "0", the passwords are kept for the current browser
session only. When the browser is restarted, the password must be re-entered.
Allow <command> = <user list>
Hosts allow = <list>
Hosts deny = <list>
123.213.
(note the trailing '.') or .mit.edu
,
or the word All
. The following rules are applied:
elogd
with the "-v" flag, in which case the rule checking is printed
on the screen.
Logfile = <filename>
can be specified
to log all user login/logout activities plus all successful user connections.[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 <attribute> <value> = <list>
Use Email Subject = <string>
Use Email From = <string>
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:
Email type "Normal routine" = ...
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.