Summary: fcdb: server frets about unset --Database config
items even when they're not meaningful
Submitted by: jtn
Submitted on: Mon May 14 00:38:57 2012
Severity: 2 - Minor
Priority: 5 - Normal
Assigned to: jtn
Discussion Lock: Any
Operating System: Any
Planned Release: 2.4.0,2.5.0
At the moment, the server is rather chatty/fussy about the contents of the
--Database file (traditionally fc_auth.conf); if any item is missing, it will
note this at log_normal level.
For instance, with SQLite, many of the keys make no sense. So with my SQLite
script under development (patch #3287), I see this every time I start the
You can learn a lot about Freeciv at http://www.freeciv.org/
2: fcdb option "host": missing from config file (using default)
2: fcdb option "port": missing from config file (using default)
2: fcdb option "user": missing from config file (using default)
2: fcdb option "password": missing from config file (using default)
2: Loading rulesets.
There are a couple of possible solutions:
* Relegate the messages to log_verbose, or remove them entirely (low-impact
* Stop the core Freeciv code caring about the set of keys entirely. It seems
odd that the server carefully validates, translates, and restricts the set of
items in the config file, when it makes no direct use of them subsequently;
any meaning is ascribed to them entirely by database.lua. So the effect of
this is to restrict extensibility in database.lua.
** Presumably the idea is to warn the server operator they might have
forgotten something, but it's counterproductive in the case of SQLite. Such
warnings would probably be better implemented in database.lua.
** I'm tempted to remove all knowledge of the keys from the server, and just
expose the secfile contents to database.lua verbatim, via a Lua data structure
or accessor function. This would likely change the Lua interface, but not
necessarily the fc_auth.conf format.
** (If it had been like this, I wouldn't have had to touch the server code to
implement patch #3273.)
The right answer could be different for S2_4 and trunk.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list