# wp-optimize/4.7.0/vendor/rosell-dk/webp-convert/src/Loggers/BaseLogger.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.7.0. 45 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/rosell-dk/webp-convert/src/Loggers/BaseLogger.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.7.0/raw/vendor/rosell-dk/webp-convert/src/Loggers/BaseLogger.php
- Modified: 2021-06-07T22:42:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/rosell-dk/webp-convert/src/Loggers/BaseLogger.php#L10-L20`.

```php
<?php

namespace WebPConvert\Loggers;

/**
 * Base for all logger classes.
 *
 * WebPConvert can provide insights into the conversion process by means of accepting a logger which
 * extends this class.
 *
 * @package    WebPConvert
 * @author     Bjørn Rosell <it@rosell.dk>
 * @since      Class available since Release 2.0.0
 */
abstract class BaseLogger
{
    /**
     * Write a message to the log
     *
     * @param  string  $msg     message to log
     * @param  string  $style   style (null | bold | italic)
     * @return void
     */
    abstract public function log($msg, $style = '');

    /**
     * Add new line to the log
     * @return void
     */
    abstract public function ln();

    /**
     * Write a line to the log
     *
     * @param  string  $msg     message to log
     * @param  string  $style   style (null | bold | italic)
     * @return void
     */
    public function logLn($msg, $style = '')
    {
        $this->log($msg, $style);
        $this->ln();
    }
}

```
