diff --git a/README.rst b/README.rst
index 272a0b9..a3af844 100644
--- a/README.rst
+++ b/README.rst
@@ -221,7 +221,38 @@ attribute ``bgcolor="#eee"``.
 Having these extra attributes basically as a "back up" for really shit
 email clients that can't even take the style attributes. A lot of
 professional HTML newsletters such as Amazon's use this. You can disable
-some attributes in ``disable_basic_attributes``
+some attributes in ``disable_basic_attributes``.
+
+
+Capturing logging from ``cssutils``
+-----------------------------------
+
+`cssutils <https://pypi.python.org/pypi/cssutils/>`__ is the library that
+``premailer`` uses to parse CSS. It will use the python ``logging`` module
+to mention all issues it has with parsing your CSS. If you want to capture
+this, you have to pass in ``cssutils_logging_handler`` and
+``cssutils_logging_level`` (optional). For example like this:
+
+.. code:: python
+
+    >>> import logging
+    >>> import premailer
+    >>> from io import StringIO
+    >>> mylog = StringIO()
+    >>> myhandler = logging.StreamHandler(mylog)
+    >>> p = premailer.Premailer("""
+    ...         <html>
+    ...         <style type="text/css">
+    ...         @keyframes foo { from { opacity: 0; } to { opacity: 1; } }
+    ...         </style>
+    ...         <p>Hej</p>
+    ...         </html>
+    ... """,
+    ... cssutils_logging_handler=myhandler,
+    ... cssutils_logging_level=logging.INFO)
+    >>> result = p.transform()
+    >>> mylog.getvalue()
+    'CSSStylesheet: Unknown @rule found. [2:1: @keyframes]\n'
 
 Running tests with tox
 ----------------------
diff --git a/premailer/premailer.py b/premailer/premailer.py
index e0ac5eb..4e5d49f 100644
--- a/premailer/premailer.py
+++ b/premailer/premailer.py
@@ -111,7 +111,9 @@ class Premailer(object):
                  base_path=None,
                  disable_basic_attributes=None,
                  disable_validation=False,
-                 cache_css_parsing=True):
+                 cache_css_parsing=True,
+                 cssutils_logging_handler=None,
+                 cssutils_logging_level=None):
         self.html = html
         self.base_url = base_url
         self.preserve_internal_links = preserve_internal_links
@@ -138,6 +140,11 @@ class Premailer(object):
         self.disable_validation = disable_validation
         self.cache_css_parsing = cache_css_parsing
 
+        if cssutils_logging_handler:
+            cssutils.log.addHandler(cssutils_logging_handler)
+        if cssutils_logging_level:
+            cssutils.log.setLevel(cssutils_logging_level)
+
     def _parse_css_string(self, css_body, validate=True):
         if self.cache_css_parsing:
             return _cache_parse_css_string(css_body, validate=validate)

Unknown property names
Property: Unknown Property name. [31:17: -ms-interpolation-mode]
Property: Unknown Property name. [4:17: mso-line-height-rule]
Property: Unknown Property name. [106:17: -webkit-text-size-adjust]
Property: Unknown Property name. [107:17: -ms-text-size-adjust]
Property: Unknown Property name. [188:21: text-rendering]
Property: Unknown Property name. [613:17: mso-text-raise]
Property: Unknown Property name. [624:17: transition]
Property: Unknown Property name.

I'm not sure what is this and what can I do about that..
Thanks for any help!

diff --git a/premailer/tests/test_premailer.py b/premailer/tests/test_premailer.py
index 4390a4e..dd9c07e 100644
--- a/premailer/tests/test_premailer.py
+++ b/premailer/tests/test_premailer.py
@@ -2,6 +2,7 @@ from __future__ import absolute_import, unicode_literals
 import sys
 import re
 import unittest
+import logging
 from contextlib import contextmanager
 if sys.version_info >= (3, ):  # As in, Python 3
     from urllib.request import urlopen
@@ -2124,6 +2125,47 @@ ent:"" !important;display:block !important}
         p = Premailer(html, disable_validation=True)
         p.transform()  # it should just work
 
+    def test_capture_cssutils_logging(self):
+        """you can capture all the warnings, errors etc. from cssutils
+        with your own logging. """
+        html = """<!doctype html>
+        <html>
+        <head>
+            <meta charset="UTF-8">
+            <title>Document</title>
+            <style>
+            @keyframes fadein {
+                from { opacity: 0; }
+                to   { opacity: 1; }
+            }
+            </style>
+        </head>
+        <body></body>
+        </html>"""
+
+        mylog = StringIO()
+        myhandler = logging.StreamHandler(mylog)
+        p = Premailer(
+            html,
+            cssutils_logging_handler=myhandler,
+        )
+        p.transform()  # it should work
+        eq_(
+            mylog.getvalue(),
+            'CSSStylesheet: Unknown @rule found. [2:13: @keyframes]\n'
+        )
+
+        # only log errors now
+        mylog = StringIO()
+        myhandler = logging.StreamHandler(mylog)
+        p = Premailer(
+            html,
+            cssutils_logging_handler=myhandler,
+            cssutils_logging_level=logging.ERROR,
+        )
+        p.transform()  # it should work
+        eq_(mylog.getvalue(), '')
+
     def test_type_test(self):
         """test the correct type is returned"""
 

pip install -e .
parse_log_pytest
requirements.txt
nose mock pytest
apt-get update apt-get install -y gcc
3.7
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
cssselect==1.2.0
cssutils==2.7.1
exceptiongroup==1.2.2
importlib-metadata==6.7.0
iniconfig==2.0.0
lxml==5.3.1
mock==5.2.0
nose==1.3.7
packaging==24.0
pluggy==1.2.0
-e git+https://github.com/peterbe/premailer.git@d2a2a4afdd06e5931545bc76b9ee940fdefdb543#egg=premailer
pytest==7.4.4
tomli==2.0.1
typing_extensions==4.7.1
zipp==3.15.0

name: premailer
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - cssselect==1.2.0
      - cssutils==2.7.1
      - exceptiongroup==1.2.2
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - lxml==5.3.1
      - mock==5.2.0
      - nose==1.3.7
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/premailer

premailer/tests/test_premailer.py::Tests::test_capture_cssutils_logging
premailer/tests/test_premailer.py::Tests::test_apple_newsletter_example premailer/tests/test_premailer.py::Tests::test_base_url_fixer premailer/tests/test_premailer.py::Tests::test_base_url_with_path premailer/tests/test_premailer.py::Tests::test_basic_html premailer/tests/test_premailer.py::Tests::test_basic_html_shortcut_function premailer/tests/test_premailer.py::Tests::test_basic_html_with_pseudo_selector premailer/tests/test_premailer.py::Tests::test_basic_xml premailer/tests/test_premailer.py::Tests::test_broken_xml premailer/tests/test_premailer.py::Tests::test_child_selector premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_argument premailer/tests/test_premailer.py::Tests::test_command_line_fileinput_from_stdin premailer/tests/test_premailer.py::Tests::test_command_line_preserve_style_tags premailer/tests/test_premailer.py::Tests::test_comments_in_media_queries premailer/tests/test_premailer.py::Tests::test_css_disable_basic_html_attributes premailer/tests/test_premailer.py::Tests::test_css_text premailer/tests/test_premailer.py::Tests::test_css_text_with_only_body_present premailer/tests/test_premailer.py::Tests::test_css_with_html_attributes premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_excluded premailer/tests/test_premailer.py::Tests::test_css_with_pseudoclasses_included premailer/tests/test_premailer.py::Tests::test_disabled_validator premailer/tests/test_premailer.py::Tests::test_doctype premailer/tests/test_premailer.py::Tests::test_empty_style_tag premailer/tests/test_premailer.py::Tests::test_external_links premailer/tests/test_premailer.py::Tests::test_external_links_unfindable premailer/tests/test_premailer.py::Tests::test_external_styles_and_links premailer/tests/test_premailer.py::Tests::test_external_styles_on_http premailer/tests/test_premailer.py::Tests::test_external_styles_on_https premailer/tests/test_premailer.py::Tests::test_external_styles_with_base_url premailer/tests/test_premailer.py::Tests::test_favour_rule_with_class_over_generic premailer/tests/test_premailer.py::Tests::test_favour_rule_with_element_over_generic premailer/tests/test_premailer.py::Tests::test_favour_rule_with_id_over_others premailer/tests/test_premailer.py::Tests::test_favour_rule_with_important_over_others premailer/tests/test_premailer.py::Tests::test_fontface_selectors_with_no_selectortext premailer/tests/test_premailer.py::Tests::test_ignore_some_external_stylesheets premailer/tests/test_premailer.py::Tests::test_ignore_some_incorrectly premailer/tests/test_premailer.py::Tests::test_ignore_some_inline_stylesheets premailer/tests/test_premailer.py::Tests::test_ignore_style_elements_with_media_attribute premailer/tests/test_premailer.py::Tests::test_include_star_selector premailer/tests/test_premailer.py::Tests::test_inline_wins_over_external premailer/tests/test_premailer.py::Tests::test_keyframe_selectors premailer/tests/test_premailer.py::Tests::test_last_child premailer/tests/test_premailer.py::Tests::test_last_child_exclude_pseudo premailer/tests/test_premailer.py::Tests::test_leftover_important premailer/tests/test_premailer.py::Tests::test_links_without_protocol premailer/tests/test_premailer.py::Tests::test_load_external_url premailer/tests/test_premailer.py::Tests::test_load_external_url_gzip premailer/tests/test_premailer.py::Tests::test_mailto_url premailer/tests/test_premailer.py::Tests::test_mediaquery premailer/tests/test_premailer.py::Tests::test_merge_styles_basic premailer/tests/test_premailer.py::Tests::test_merge_styles_non_trivial premailer/tests/test_premailer.py::Tests::test_merge_styles_with_class premailer/tests/test_premailer.py::Tests::test_mixed_pseudo_selectors premailer/tests/test_premailer.py::Tests::test_multiple_style_elements premailer/tests/test_premailer.py::Tests::test_multithreading premailer/tests/test_premailer.py::Tests::test_parse_style_rules premailer/tests/test_premailer.py::Tests::test_precedence_comparison premailer/tests/test_premailer.py::Tests::test_prefer_inline_to_class premailer/tests/test_premailer.py::Tests::test_shortcut_function premailer/tests/test_premailer.py::Tests::test_strip_important premailer/tests/test_premailer.py::Tests::test_style_attribute_specificity premailer/tests/test_premailer.py::Tests::test_style_block_with_external_urls premailer/tests/test_premailer.py::Tests::test_turnoff_cache_works_as_expected premailer/tests/test_premailer.py::Tests::test_type_test premailer/tests/test_premailer.py::Tests::test_xml_cdata
README.rst premailer/premailer.py
README.rst premailer/premailer.py