SeasX / SeasLog

An effective,fast,stable log extension for PHP.http://pecl.php.net/package/SeasLog http://php.net/SeasLog
http://seasx.github.io/SeasLog/
Other
1.2k stars 276 forks source link

Fix: s390x and mips64 platform #294

Closed viest closed 4 years ago

viest commented 4 years ago

Platform

Issue: #292

int small;
zend_long *zl;
zl = (zend_long *)&small;
*al = 10;

// small?
// s390x and mips64 platform
// small == 0

Higher fault tolerance judgment

if (SEASLOG_G(appender) <= SEASLOG_APPENDER_FILE)

Meet the judgment:

switch SEASLOG_G(appender)
{
    case SEASLOG_APPENDER_TCP:
    case SEASLOG_APPENDER_UDP:
        // ......
        break;
    case SEASLOG_APPENDER_FILE:
    default:
        // ......
}