use Propel\Runtime\Logger\LoggerFactory; use Propel\Runtime\Logger\StreamLogger; // create a stream logger that will write to a file $logger = new StreamLogger('/path/to/logfile.log'); // register the logger with the Propel LoggerFactory LoggerFactory::setLogger($logger); // perform some database queries $c = new Criteria(); $c->add(UserTableMap::COLUMN_NAME, 'John'); $users = UserQuery::create()->findByCriteria($c); // check the Propel log echo file_get_contents('/path/to/logfile.log');In this example, we create a `StreamLogger` object that will write log messages to a file specified by the path `/path/to/logfile.log`. We then register this logger with the `LoggerFactory` provided by Propel, so that it will be used to log the database queries. After executing some queries using Propel, we retrieve the log file contents and output them to the standard output. Propel is available as a package on Packagist, a PHP package repository, as `propel/propel`.