write("Hello, world!"); ?>
write("Error: Something went wrong", Logger::ERROR); ?>
write("Debug info", Logger::DEBUG); ?>In this example, we log a debug message with the log level set to DEBUG. Overall, the PHP Logger is a useful and flexible tool for logging messages in a PHP application. Its simple API and wide range of features make it a popular choice for developers.