Book Image

Learning Penetration Testing with Python

By : Christopher Duffy
Book Image

Learning Penetration Testing with Python

By: Christopher Duffy

Overview of this book

Table of Contents (19 chapters)
Learning Penetration Testing with Python
Credits
Disclaimer
About the Author
Acknowlegements
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding logging within Python


As you write your own modules, such as the one highlighted in Chapter 9, Automating Reports and Tasks with Python, you would want to be able to track errors, warnings, and debug messages easily. The logger library allows you to track events and output them to Standard Error (STDERR), files, and Standard Output (STDOUT). The benefit to using logger is that the format can be easily defined and sent to the relevant output using specific message types. The messages are similar to syslog messages, and they mimic the same logging levels.

Note

More details about the logger library can be found at https://docs.python.org/2/library/logging.html.