OpenSwoole\Util::log

25.x is outdated, please check the latest version 26.x


Latest version: pecl install openswoole-26.2.0

Declaration

<?php OpenSwoole\Util::log()

Parameters

logLevel

Log level, OpenSwoole\Constant::LOG_DEBUG|OpenSwoole\Constant::LOG_TRACE|OpenSwoole\Constant::LOG_INFO|OpenSwoole\Constant::LOG_NOTICE|OpenSwoole\Constant::LOG_WARNING|OpenSwoole\Constant::LOG_ERROR|OpenSwoole\Constant::LOG_NONE

log

Log message.

Return

Description

Adds a log record.

Log levels in OpenSwoole

  • OpenSwoole\Constant::LOG_DEBUG
  • OpenSwoole\Constant::LOG_TRACE
  • OpenSwoole\Constant::LOG_INFO
  • OpenSwoole\Constant::LOG_NOTICE
  • OpenSwoole\Constant::LOG_WARNING
  • OpenSwoole\Constant::LOG_ERROR
  • OpenSwoole\Constant::LOG_NONE
Last updated on February 28, 2026