CARVIEW |
Select Language
HTTP/2 200
date: Fri, 18 Jul 2025 09:52:25 GMT
content-type: text/html; charset=utf-8
server: cloudflare
last-modified: Thu, 26 Jun 2025 16:37:18 GMT
vary: Accept-Encoding
access-control-allow-origin: *
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
expires: Fri, 18 Jul 2025 10:02:25 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=MewycQmhUt02R69k3qQOsAXzZmDwTfUNCayS1YEN6mUpwjAdzxtCvr3ey%2BosjEBwoOFssAVl5YxbrHE9vFpNreUhanE02vV%2FEw%3D%3D"}]}
x-proxy-cache: MISS
x-github-request-id: BA56:17A3ED:7B74B1:892358:687A1959
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 9611160ab8cf3a4e-BOM
alt-svc: h3=":443"; ma=86400
abseil / Logging
Docs
C++ Devguide
Python Devguide
- Quickstart
Programming Guides
- app.py
- Flags
- Logging
- Testing
Logging
Abseil has its own library for logging in Python. It is implemented on top of the standard logging module in Python (described in PEP282), which is good if you’re already familiar with that library. This section mentions the basics of Abseil’s logging library. See the source for more details.
Dependencies:
from absl import logging
Example code:
logging.info('Interesting Stuff')
logging.info('Interesting Stuff with Arguments: %d', 42)
logging.set_verbosity(logging.INFO)
logging.log(logging.DEBUG, 'This will *not* be printed')
logging.set_verbosity(logging.DEBUG)
logging.log(logging.DEBUG, 'This will be printed')
logging.warning('Worrying Stuff')
logging.error('Alarming Stuff')
logging.fatal('AAAAHHHHH!!!!') # Process exits
Log levels:
logging.FATAL
logging.ERROR
logging.WARNING
logging.INFO
logging.DEBUG
Functions:
fatal(msg, *args)
error(msg, *args)
warning(msg, *args)
info(msg, *args)
debug(msg, *args)
vlog(level, msg, *args)
exception(msg, *args)