[#common-GetSetting]
= xref:common.adoc[common]::GetSetting
:relfileprefix: ../
:mrdocs:

Get settings value from combined sources&colon; forced settings, command line arguments, runtime read&hyphen;write settings, and the read&hyphen;only config file&period;

== Synopsis

Declared in `&lt;common&sol;settings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:common/SettingsValue.adoc[SettingsValue]
GetSetting(
    xref:common/Settings.adoc[Settings] const& settings,
    std::string const& section,
    std::string const& name,
    bool ignore&lowbar;default&lowbar;section&lowbar;config,
    bool ignore&lowbar;nonpersistent,
    bool get&lowbar;chain&lowbar;type);
----

== Return Value

The resolved setting value, or a null value if unset&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ignore&lowbar;default&lowbar;section&lowbar;config*
| &hyphen; ignore values in the default section of the config file (part before any &lsqb;section&rsqb;keywords)
| *ignore&lowbar;nonpersistent*
| &hyphen; ignore non&hyphen;persistent settings values (forced settings values and values specified on the command line)&period; Only return settings in the read&hyphen;only config and read&hyphen;write settings files&period;
| *get&lowbar;chain&lowbar;type*
| &hyphen; enable special backwards compatible behavior for GetChainType
| *settings*
| The combined settings sources to read from&period;
| *section*
| The config section to look up (e&period;g&period; the network name)&period;
| *name*
| The setting name to look up&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
