Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit d78dbe6

Browse files
committed
Reduce one logging level
Do not log warnings unless strictly needed because otherwise it breaks CIs. Besides, I'm lowering down a logging level for debugging output.
1 parent 3b49a4c commit d78dbe6

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

docs/configuration.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ These settings are global and have effect on both, tooltips and modal dialogues.
100100

101101
.. _Mathjax: http://www.sphinx-doc.org/es/master/usage/extensions/math.html#module-sphinx.ext.mathjax
102102

103+
104+
.. warning::
105+
106+
You shouldn't modify the following three settings (api_host, project, version) unless you know what you are doing.
107+
Their defaults should be fine to build the documentation and make it work in Read the Docs.
108+
109+
103110
.. confval:: hoverxref_api_host
104111

105112
Description: Host URL for the API to retrieve the content of the floating window

hoverxref/domains.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def _inject_hoverxref_data(self, env, refnode, typ, docname, docpath, labelid):
2626
if not type_class:
2727
default = env.config.hoverxref_default_type
2828
type_class = default
29-
logger.warning(
30-
'Using default style for unknown typ. '
31-
'Define it in hoverxref_role_types. typ=%s style=%s',
32-
typ,
29+
logger.info(
30+
'Using default style (%s) for unknown typ (%s). '
31+
'Define it in hoverxref_role_types.',
3332
default,
33+
typ,
3434
)
3535
classes.append(type_class)
3636

@@ -84,7 +84,7 @@ def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
8484
docname, labelid = obj[0], name
8585
docpath = self._get_docpath(builder, docname)
8686
self._inject_hoverxref_data(env, refnode, typ, docname, docpath, labelid)
87-
logger.info(
87+
logger.debug(
8888
':ref: _hoverxref injected: fromdocname=%s %s',
8989
fromdocname,
9090
refnode._hoverxref,
@@ -128,7 +128,7 @@ def _resolve_ref_xref(self, env, fromdocname, builder, typ, target, node, contno
128128
docname, labelid, _ = get_ref_xref_data(self, node, target)
129129
docpath = self._get_docpath(builder, docname)
130130
self._inject_hoverxref_data(env, refnode, typ, docname, docpath, labelid)
131-
logger.info(
131+
logger.debug(
132132
':ref: _hoverxref injected: fromdocname=%s %s',
133133
fromdocname,
134134
refnode._hoverxref,
@@ -150,7 +150,7 @@ def _resolve_obj_xref(self, env, fromdocname, builder, typ, target, node, contno
150150
docname, labelid = get_ref_obj_data(self, node, typ, target)
151151
docpath = self._get_docpath(builder, docname)
152152
self._inject_hoverxref_data(env, refnode, typ, docname, docpath, labelid)
153-
logger.info(
153+
logger.debug(
154154
':%s: _hoverxref injected: fromdocname=%s %s',
155155
typ,
156156
fromdocname,

hoverxref/extension.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ def is_hoverxref_configured(app, config):
188188
if not project or not version:
189189
config.hoverxref_is_configured = False
190190
# ``hoverxref`` extension is not fully configured
191-
logger.warning(
191+
logger.info(
192192
'hoverxref extension is not fully configured. '
193-
'Set hoverxref_project and hoverxref_version in your conf.py file.',
193+
'Tooltips may not work as expected. '
194+
'Check out the documentation for hoverxref_project and hoverxref_version configuration options.',
194195
)
195196

196197

0 commit comments

Comments
 (0)