A method and system for tracing and logging for a software module is
provided. The method includes the steps of detecting at least one error
and analyzing at least one error message corresponding to each detected
error. The method further includes the step of monitoring the resources
of a computer system. Further, the method includes the step of adjusting
(e.g., automatically adjusting) a tracing and logging level, based on the
analysis of the error messages and the availability of resources.