URL:
<http://gna.org/bugs/?19733>
Summary: fcdb: server frets about unset --Database config
items even when they're not meaningful
Project: Freeciv
Submitted by: jtn
Submitted on: Mon May 14 00:38:57 2012
Category: None
Severity: 2 - Minor
Priority: 5 - Normal
Status: None
Assigned to: jtn
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: Any
Planned Release: 2.4.0,2.5.0
_______________________________________________________
Details:
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
server:
...
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
option):
* 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:
<http://gna.org/bugs/?19733>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev