rrada/HouseAgent — comment on commit 009f828bda6d4fbc44a59536567b6abd62081c06
File:  line 0
By rrada:

On 5 November 2011 11:19, Maarten Damen <
reply@reply.github.com>wrote:

> I like the way this is implemented. However, I do have some questions:
>
> - When the /tmp path exists it will default to that right now, correct? I
> think the usual way to run HouseAgent is under a separate user, and thus it
> would be nice to have the logfiles directly under the HouseAgent directory
> in logs/
>

Sure, the /tmp path is in current HouseAgent.conf for demonstration only.
We can use the logpath=./logs by default. Or you can use variables in the
config file. So you can create a option app_root=/opt/HouseAgent and than
use logpath=%(app_root)s/logs. And the way of using absolute path is better
and much more clear than relative.

Here is another tip, how to do it for whole HouseAgent(*NIX version)
project. We don't need to divide it to all system directories like /etc/,
/usr, /var. We can put whole HouseAgent to a /srv or /opt directory, just
like this:
/opt
/opt/HouseAgent
/opt/HouseAgent/conf
/opt/HouseAgent/lib
/opt/HouseAgent/{tmp,log,plugins,modules}
[...whatever...]

And you have a better control on whole structure and you don't need to
think about things like: "Hm, this must be packed this way, because we have
all modules and libraries in /usr/share/python....". I'm not 100% sure,
that there is simillar way, how to do it under Windows, but it would be
nice.

(My opinion)

> - For the Windows log directory I would like to keep the programdata in
> place, this is what get's created by the WIndows installer, and this is
> what complies with the Windows logo standard.
>

Ok.
I think that here is way, how to solve it for both systems. We can have a 2
config files. One for Windows and the second for Linux/Unix like systems.

OR

We can have one config file with settings, that are not OS specific, like
webserver and ZMQ configuration and the second for OS specific
configuration(e.g. paths).

> - I like the way error are handled, but should we help the user by falling
> back to default values when the values are not supplied within the
> configuration file?
>

Good question, but I think that usage of default values are good way. There
can be a situation that the option needs a value and HouseAgent cannot
start without it, than the default value is used.
But if you think, that is better to don't start HouseAgent with default
value and force the editation of configfile by user, we can do that this
way.

> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/rrada/HouseAgent/commit/009f828bda6d4fbc44a59536567b6abd62081c06#commitcomment-697296
>