Use the logger library.
Use rb-inotify for file watching.