Logging object in python


/ Published in: Python
Save to your folder(s)

Understanding logger objects in Python Logging module

***

[Full link ](https://docs.python.org/2/howto/logging.html#loggers)

```import logging``` to import logging module.

Hierarchy:
```logging ->handler->formatter```

Logging is User API. Handling handles the logging instance's requests to log. Also has its own level. Formatter is the final gate to writing the logs down. Helps format.

`logging.BasicConfig` to start a basic logger.

URL: http://www.blog.pythonlibrary.org/2012/08/02/python-101-an-intro-to-logging/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.