Skip to content

Commit

Permalink
📝 Add docs entry about this
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Jan 30, 2022
1 parent 6067374 commit d222725
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ This project offers you an alternative to **Universal Charset Encoding Detector*
<img src="https://i.imgflip.com/373iay.gif" alt="Reading Normalized Text" width="226"/><img src="https://media.tenor.com/images/c0180f70732a18b4965448d33adba3d0/tenor.gif" alt="Cat Reading Text" width="200"/>

*\*\* : They are clearly using specific code for a specific encoding even if covering most of used one*<br>
Did you got there because of the logs? See [https://charset-normalizer.readthedocs.io/en/latest/user/miscellaneous.html](https://charset-normalizer.readthedocs.io/en/latest/user/miscellaneous.html)

## ⭐ Your support

Expand Down
26 changes: 26 additions & 0 deletions docs/user/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,29 @@ Any ``CharsetMatch`` object can be transformed to exploitable ``str`` variable.

# This should print '我没有埋怨,磋砣的只是一些时间。'
print(str(result))


Logging
-------

Prior to the version 2.0.10 you may encounter some unexpected logs in your streams.
Something along the line of:

::

... | WARNING | override steps (5) and chunk_size (512) as content does not fit (465 byte(s) given) parameters.
... | INFO | ascii passed initial chaos probing. Mean measured chaos is 0.000000 %
... | INFO | ascii should target any language(s) of ['Latin Based']


It is most likely because you altered the root getLogger instance. The package has its own logic behind logging and why
it is useful. See https://docs.python.org/3/howto/logging.html to learn the basics.

If you are looking to silence and/or reduce drastically the amount of logs, please upgrade to the latest version
available for `charset-normalizer` using your package manager or by `pip install charset-normalizer -U`.

The latest version will no longer produce any entry greater than `DEBUG`.
On `DEBUG` only one entry will be observed and that is about the detection result.

Then regarding the others log entries, they will be pushed as `Level 5`. Commonly known as TRACE level, but we do
not register it globally.

0 comments on commit d222725

Please sign in to comment.