See Log Watch Overview for an overview of how log works and how the the architectural components fit together.
See Inotify Usage Overview for an overview of how Inotify is utilized to provide a monitoring backend for the log watcher.
Click on the files tab to visit the documentation for each file. Click on the code link to see the implementation or click on "Go to the source code of this file." link when viewing file documentation. Clicking on almost any item takes you either to the documentation for that item or it's implementation.