|
40 | 40 | else: |
41 | 41 | pass |
42 | 42 |
|
43 | | -logging.getLogger("py_asciimath.utils").setLevel("CRITICAL") |
| 43 | +logger = logging.getLogger("py_asciimath.utils") |
| 44 | +logger.setLevel(logging.INFO) |
44 | 45 |
|
45 | 46 |
|
46 | 47 | # common statements used within the docs to avoid duplication |
@@ -874,7 +875,7 @@ def to_rst(self, indent="", max_length=100, links=None, base_url=None): |
874 | 875 | """Return a string to enable converting the element to an RST format.""" |
875 | 876 | key = f"{self.targetptr}" |
876 | 877 | if (links or base_url) is None: |
877 | | - logging.error("ERROR in the links or the base_url definitions - OLink class.") |
| 878 | + logger.error("ERROR in the links or the base_url definitions - OLink class.") |
878 | 879 | if key in links: |
879 | 880 | root_name, root_title, href, text = links[key] |
880 | 881 | link = f"{base_url}{root_name}/{href}" |
@@ -1572,7 +1573,7 @@ def __repr__(self): |
1572 | 1573 | def to_rst(self, indent="", max_length=100, links=None, base_url=None): |
1573 | 1574 | """Return a string to enable converting the element to an RST format.""" |
1574 | 1575 | if (links or base_url) is None: |
1575 | | - logging.error( |
| 1576 | + logger.error( |
1576 | 1577 | "ERROR exists in the links or the 'base_url' definitions in the 'Link' class." |
1577 | 1578 | ) |
1578 | 1579 | tail = " ".join([str(item) for item in self]) |
@@ -2559,10 +2560,10 @@ def multiple_args(self): |
2559 | 2560 | split_name[k + 1] |
2560 | 2561 | ) |
2561 | 2562 | if name_iter_prev != name_iter_next: |
2562 | | - logging.warning( |
| 2563 | + logger.warning( |
2563 | 2564 | f"The argument name is not consistent: {name_iter_prev} != {name_iter_next}" # noqa : E501 |
2564 | 2565 | ) |
2565 | | - logging.info( |
| 2566 | + logger.info( |
2566 | 2567 | "Applying the longest name for the argument list as it's probably coming from a typography." # noqa : E501 |
2567 | 2568 | ) |
2568 | 2569 | if len(name_iter_prev) > len(name_iter_next): |
@@ -3221,7 +3222,7 @@ def trail_replacer(match): |
3221 | 3222 | docstr = ponctuaction_whitespace(docstr, ",") # Remove extra whitespace before comma |
3222 | 3223 |
|
3223 | 3224 | if self.is_archived == True: |
3224 | | - logging.info(f"{self.name} is an archived command.") |
| 3225 | + logger.info(f"{self.name} is an archived command.") |
3225 | 3226 | docstr = ( |
3226 | 3227 | docstr |
3227 | 3228 | + "\n\n.. warning::\n" |
|
0 commit comments