use LogFactory\LogFactory; $logger = LogFactory::create('my_logger');
$logger->info('User {id} logged in', ['id' => $userId]);
try { // Something that fails } catch (Exception $e) { $logger->error('Error: {message}', ['message' => $e->getMessage()]); }In the examples above, `LogFactory` is the main class of the library, and `create` is a static method to create a new logger instance. The `info` and `error` methods are used to log messages at different levels (info and error). Overall, the PHP log factory is a useful package library for logging in PHP applications, making it easy to log messages to various destinations with minimal effort.