Software monitoring and logging is one of the most important tools a softwareengineer has when faced with the challenge of auditing or analysing a softwaresystem. However, the difficulty in effectively monitoring a system, managing itslogs and cross referencing them with source code makes software re-engineering arigorous and complex task. This thesis aims to address this issue by providinga framework that enables pattern matching between a software log and an eventpattern expression that is based on a monitoring policy. The framework consists ofparsers and annotators that facilitates transformation of a monitoring policy intoa Petri Net as well as source code annotation for gathering data through loggedevents. It further expands upon this work by proposing an adaptive logging frameworkthat will greatly improve the quality of log management by autonomicallyadjusting the amount of information logged based on the application’s operationalenvironment. Finally, a prototype system of the policy driven monitoring frameworkis implemented and tested with applications of different scales as a proof ofconcept for the proposed framework.