import org.apache.log4j.Logger; public class MyClass { private static final Logger logger = Logger.getLogger(MyClass.class); public void myMethod() { logger.info("This is an example log message."); } }In this example, we import the `Logger` class from the `org.apache.log4j` package and define a static logger instance for the `MyClass` class. We then use the `info` method of the logger to log a message from the `myMethod` method. The org.apache.log4j Logger belongs to the Apache Log4j library.