Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
juga
sbws
Commits
cd50bc49
Commit
cd50bc49
authored
6 years ago
by
juga
Committed by
Matt Traudt
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update doc with config files changes
parent
3cfb8dd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/config.rst
+25
-12
25 additions, 12 deletions
docs/source/config.rst
with
25 additions
and
12 deletions
docs/source/config.rst
+
25
−
12
View file @
cd50bc49
Simple Bandwidth Scanner Configuration Files
============================================
Sbws has three config files it reads: two general, and one specific to logging.
They all get combined internally to the same ``conf`` structure, so technically
you can put any option in any file, but you need to pay attention to the order
in which they are read. Options specified in multiple files will take the
values set in the last-read file. **It's best to only put options in the files
you are meant to put them in.**
How to create user customized configuration files
--------------------------------------------------
``sbws`` use internal configuration files.
These are **not** intented to be modified by a user.
If a user needs a customized configuration file, the user needs to create it.
There's an example configuration file with the minimum data that a user
probably needs to edit in ``examples``. For more advanced configuration options see
documentation below.
``sbws`` will check by default whether there's a user customized file in
``~/sbws.ini`` and use it when it exists.
The user can store a customized configuration file anywhere else in the file
system and and provide ``sbws`` with the path to it via the ``-c`` or
``--config`` cli option.
How sbws configuration works internally
----------------------------------------
Sbws has two default config files it reads: on general, and one specific to
logging.
They all get combined internally to the same ``conf`` structure.
It first reads the config file containing the default values for almost all
options. If you installed sbws in a virtual environment located at /tmp/venv,
...
...
@@ -21,16 +34,16 @@ previous file. The contents of this default log config file can be found
:ref:`at the bottom of this page <default-log-config>`. Options set here
overwrite options set in the previous config file.
Sbws then reads your custom config file. By default,
after running ``sbws
init``, it is located
in ``~/.sbws
/config
.ini``. Options in this
file overwrite options set in previously
read config files.
Sbws then reads your custom config file. By default,
it will search for it
in ``~/.sbws.ini``. Options in this
file overwrite options set in previously
read config files.
After running ``sbws init``, your ``~/.sbws/config.ini
`` might look like this.
The user example config file provided by ``sbws
`` might look like this.
.. _init-config:
.. literalinclude:: config.ini
:caption: Example
~/.sbws/config
.ini
.. literalinclude:: config.
example.
ini
:caption: Example
config.example
.ini
**No other configuration files are read.**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment