| @@ -5,15 +5,22 @@ | ||
| 5 | 5 | |
| 6 | 6 | class FrmTransLiteLog { |
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | + * @since 6.12 The $is_error parameter was added. | |
| 10 | + * | |
| 9 | 11 | * @param string $title |
| 10 | 12 | * @param string $text |
| 13 | + * @param bool $is_error When this is false, the message will not be logged to the error log if the logging add-on is unavailable. | |
| 14 | + * | |
| 11 | 15 | * @return void |
| 12 | 16 | */ |
| 13 | - public static function log_message( $title, $text ) { | |
| 17 | + public static function log_message( $title, $text, $is_error = true ) { | |
| 14 | 18 | if ( ! class_exists( 'FrmLog' ) ) { |
| 15 | - error_log( $title . ': ' . $text ); | |
| 19 | + if ( $is_error ) { | |
| 20 | + error_log( $title . ': ' . $text ); | |
| 21 | + } | |
| 22 | + | |
| 16 | 23 | return; |
| 17 | 24 | } |
| 18 | 25 | |
| 19 | 26 | $log = new FrmLog(); |