Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: rlog joined config file #14

Open
Trickx opened this issue May 8, 2017 · 2 comments
Open

enhancement: rlog joined config file #14

Trickx opened this issue May 8, 2017 · 2 comments

Comments

@Trickx
Copy link

Trickx commented May 8, 2017

I'm working on a project utilising a similar config file syntax as rlog does.
The logic consequence was to join them both.
It's working, but rlog complains about unkown or malformed settings:

rlog - Malformed line in config file file:line. Ignored.
rlog - Unknown or illegal setting name in config file file:line. Ignored.

Having multiple config file for a single application is a nightmare for me.
So I decided to comment out corresponding lines in my version of rlog.

What about officially supporting multi function config files instead?

Regards,
Trickx

@jbrendel
Copy link
Contributor

jbrendel commented May 9, 2017

Hello!

This could probably be done and would require 'sections' of sorts to be introduced. I don't want to break the old config file format, though.

We could do something like in the .ini file format. But if the first non-blank or non-comment line is NOT a section identifier then we'd still assume it's the old style file format. Rlog could have an '[rlog]' section heading.

Would that work for you?

@Trickx
Copy link
Author

Trickx commented May 10, 2017

Hi Jürgen,

greetings to the most far away location from my perspective :-)
Sectioning the config file sounds good to me.
Currently the log file, I would like to merge with looks simirlar to the following example.
I can easily add an [rlog] section.

Thanks,
TriCX

[base]
serial="smartpi160812345"
name="House"

[location]
lat=52.3667
lng=9.7167

[database]
counterdir="/var/smartpi"
dir="/var/smartpi/db"

[device]
i2c_device="/dev/i2c-1"
shared_dir="/var/tmp/smartpi"
shared_file="values"
power_frequency=50

[ftp]
ftp_upload=0
ftp_server=ftp.xxxxx.xx
ftp_user=xxxxxxxxxxx
ftp_pass=xxxxxxxxxxxx
ftp_path=smartpi/

[csv]
decimalpoint=,
timeformat=2006-01-02 15:04:05

[webserver]
port=1080
docroot="/var/smartpi/www"

[mqtt]
mqtt_enabled=0
mqtt_broker_url=""
mqtt_broker_port=""
mqtt_username=""
mqtt_password=""
mqtt_topic=""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants