trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

Add section to app.yml for developer-defined app settings #96

Closed macMikey closed 5 years ago

macMikey commented 6 years ago

I'd like to have a section in the app.yml file specially called-out for settings for my app, that I then know Levure will ignore and respect, and won't accidentally use or ignore.

example - I have my own logging code. I'd like to be able to throw the log level, path to the log folder, names of the various log files.

I am concerned that if we do not have a section of the file that Levure will respect and otherwise ignore, we have a chance to have settings that use the same name as a levure setting, especially if in a future release, levure makes some changes to app.yml

trevordevore commented 6 years ago

The app.yml file is parsed into a single array that then becomes accessIble using a getter and setter. If Levure ignored a section you would have to go back and parse the file yourself. At that point you may as well just create your own separate config file.

We could possibly bless a root key (eg settings) that you could store settings under.

macMikey commented 6 years ago

I think that is a better description of what I was hoping for.

trevordevore commented 6 years ago

Okay. This should just be a matter of updating the docs to say that the settings key (unless someone has a better suggestion) is a reserved key where app specific settings can be stored. Levure will not use this key for something else going forward and helpers should not use this key for helper-specific settings.

macMikey commented 6 years ago

Perfect!

macMikey commented 5 years ago

Updated wiki https://github.com/trevordevore/levure/wiki/app.yml#custom-settings

trevordevore commented 5 years ago

👍