RESTful and HTTP APIs in Pyramid Transcripts
Chapter: Logging and monitoring
Lecture: Introducing logbook
0:01 In this course we're going to be using something called logbook.
0:05 Now, logbook is made by Armin Ronacher, the guy who created Flask
0:09 and logbook is really nice; Python comes with built in logging,
0:14 but for some reason it's just not so clean and simple,
0:17 I don't know why, but not so much fun; Logbook made it be more fun,
0:21 so here you can see a really simple example of how you might set it up,
0:24 say we're going to push to standard out, setup a logbook and off it goes,
0:29 and we'll do this in a couple of different ways in our apis,
0:32 but what makes this fun, what about getting log messages to your phone
0:37 or desktop notification system, logbook can do that.
0:40 So logbook has got a bunch of cool features
0:42 and I like it because it's really easy to use,
0:45 and it works well with layered systems,
0:47 so different levels of your web app can have
0:51 different output type messages and so on, so that's really great,
0:54 it's easy to tell where did this error come from
0:57 or what was the sequence of events that led to some log message.