configuration-files

Application configuration files [closed]

半城伤御伤魂 提交于 2019-12-03 06:18:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . OK, so I don't want to start a holy-war here, but we're in the process of trying to consolidate the way we handle our application configuration files and we're struggling to make a decision on the best approach to take. At the moment, every application we distribute is using it's own ad-hoc configuration files,

Use properties file instead of static final variables

怎甘沉沦 提交于 2019-12-03 06:05:14
I have many classes with static final fields which are used as default values or config. What is best approach to create global config file? Should I move these fields to single static class, use properties file or what? Edit: I need to use this values both in java classes and xhtml pages. Values dosen't depend on envirnoment. I could compile project to set new values - no problem. The answer depends... Put stuff in properties files if the values change depending on runtime environment (eg database connection settings, foreign server IPs), or that will likely change often/soon Prefer using

iOS Application Configuration File

五迷三道 提交于 2019-12-03 05:02:36
问题 In a C# application I always used an app.config file to save some data for my application to load when needed (e.g Connection String). What is the best way to save information like this in an iOS application? 回答1: You can create a property list file (there is a template for that in XCode, just to to File -> New file and choose there), so you will have something like "settings.plist", or anything like that. You can think of a plist as being a key => value config file, with the difference that

python single configuration file

不羁的心 提交于 2019-12-03 04:17:37
问题 I am developing a project that requires a single configuration file whose data is used by multiple modules. My question is: what is the common approach to that? should i read the configuration file from each of my modules (files) or is there any other way to do it? I was thinking to have a module named config.py that reads the configuration files and whenever I need a config I do import config and then do something like config.data['teamsdir'] get the 'teamsdir' property (for example).

Equivalents of XDG_CONFIG_HOME and XDG_DATA_HOME on Mac OS X?

♀尐吖头ヾ 提交于 2019-12-03 04:15:32
问题 I am planning to develop a cross-platform script. On Linux and other operating systems, it will store configuration in XDG_CONFIG_HOME and data files (specifically, downloaded plugins) in XDG_DATA_HOME . On Windows, it will use APPDATA for both (unless someone has a better idea). However, what would be the proper thing to do on Mac OS X? On my first glance through a handy Macbook's ~/Library directory, I saw Preferences and Application Support folders. I was originally planning to use those,

Bash Parse Arrays From Config File

。_饼干妹妹 提交于 2019-12-03 03:33:12
I need to have an array for each "section" in the file containing: [array0] value1=asdf value2=jkl [array1] value1=1234 value2=5678 I want to be able to retrieve these values like this: echo ${array0[value1]} echo ${array0[value2]} echo ${array1[value1]} echo ${array1[value2]} Any thoughts on how to accomplish this? (Explanations would be a bonus) I've already read these anwsers but none do exactly what I want to do. Read a config file in BASH without using "source" BASH Parsing variables from config file Array like data structure in bash (config file)? with bash v4, using associative arrays,

Django: how to set log level to INFO or DEBUG

浪尽此生 提交于 2019-12-03 03:23:16
I tried to change the debug level to DEBUG in Django because I want to add some debug messages to my code. It seems to have no effect. My logging configuration: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'console':{ 'level':'DEBUG', 'class':'logging.StreamHandler', 'formatter': 'simple' }, }, 'loggers': { 'django.request':{ 'handlers': ['console'], 'propagate': False, 'level': 'DEBUG', }, }, } Code: import logging ; logger = logging.getLogger(__name__) logger.debug("THIS MESSAGE IS NOT SHOWN

Eclipse Java launch configuration file path

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 02:34:50
问题 I'm looking for a file where Eclipse stores its launch configurations. I'm doing some Java development in Ubuntu. One of the executables i'm developing requires an output from another executable as a argument to it. So say, the output of 'B' needs to be passed as a commandline argument to 'A'. In the Eclipse, I don't want to manually change the "Run Configuration" every time. Where does Eclipse store these configurations esp the arguments? I found a "eclipseArguments.txt" in the extras folder

Playframework settings depending on environment

前提是你 提交于 2019-12-03 01:08:48
I'm using playframework 2.1-RC2. First of all I've seen all the similar questions , so I followed the common instruction of separating application.conf file per environment. So I have application.test.conf and I run tests this way: play -Dconfig.file=./conf/application.test.conf "test" I tried different combinations, like play -Dconfig.file=./conf/application.test.conf ~test or play -Dconfig.file=conf/application.test.conf ~test Still no luck, it just does not get picked, default one (application.conf) is instead. From the other side, if I do play -Dconfig.file=./conf/application.dev.conf "run

Tools for previewing configuration file transformations

杀马特。学长 韩版系。学妹 提交于 2019-12-03 00:37:30
Are there any tools or Visual Studio 2010 extensions which allow me to view the output of a configuration file transformation short of having to publish the entire project? Is the process which performs the transformation directly invokable? Edit After a little more Googling I came across this : Step 4: Generating a new transformed web.config file for “Staging” environment from command line Open Visual Studio Command prompt by going to Start --> Program Files –> Visual Studio v10.0 –> Visual Studio tools –> Visual Studio 10.0 Command Prompt Type “MSBuild “Path to Application project file (