Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); namespace Seffeng\LaravelSLS\Tests; use PHPUnit\Framewor..
Decoded Output download
<?php declare(strict_types=1);
namespace Seffeng\LaravelSLS\Tests;
use PHPUnit\Framework\TestCase;
use Seffeng\LaravelSLS\Facades\SLSLog;
use Illuminate\Support\Facades\Log;
use Seffeng\LaravelSLS\Facades\Writer;
class LogTest extends TestCase
{
/**
*
* @author zxf
* @date 2020417
* @throws \Exception
*/
public function testPutLogs()
{
try {
//
$mode = 2;
if ($mode === 1) {
// [['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]
app('sls')->putLogs(['username' => 'admin', 'action' => 'create user.111']);
} elseif ($mode === 2) {
// [['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]
SLSLog::putLogs([['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]);
} elseif ($mode === 3) {
//
Writer::info('bbbb', ['user' => 'bbb', 'action' => 'cccccccccccc']);
} else {
// topic source Log::info()|SLSLog::putLogs()|app('sls')->putLogs()... setTopicsetSource
// app('sls')->setTopic('topic-new')->setSource('source-new');
// logging LOG_CHANNEL ssl
Log::debug('admin create user.333', ['user' => 'bbb', 'action' => 'cccccccccccc']);
}
} catch (\Exception $e) {
throw $e;
}
}
}
?>
Did this file decode correctly?
Original Code
<?php declare(strict_types=1);
namespace Seffeng\LaravelSLS\Tests;
use PHPUnit\Framework\TestCase;
use Seffeng\LaravelSLS\Facades\SLSLog;
use Illuminate\Support\Facades\Log;
use Seffeng\LaravelSLS\Facades\Writer;
class LogTest extends TestCase
{
/**
*
* @author zxf
* @date 2020417
* @throws \Exception
*/
public function testPutLogs()
{
try {
//
$mode = 2;
if ($mode === 1) {
// [['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]
app('sls')->putLogs(['username' => 'admin', 'action' => 'create user.111']);
} elseif ($mode === 2) {
// [['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]
SLSLog::putLogs([['username' => 'admin', 'action' => 'create user.111'], ['username' => 'admin', 'action' => 'delete user.111']]);
} elseif ($mode === 3) {
//
Writer::info('bbbb', ['user' => 'bbb', 'action' => 'cccccccccccc']);
} else {
// topic source Log::info()|SLSLog::putLogs()|app('sls')->putLogs()... setTopicsetSource
// app('sls')->setTopic('topic-new')->setSource('source-new');
// logging LOG_CHANNEL ssl
Log::debug('admin create user.333', ['user' => 'bbb', 'action' => 'cccccccccccc']);
}
} catch (\Exception $e) {
throw $e;
}
}
}
Function Calls
None |
Stats
MD5 | 6a5b079c30ff0d3dcfbc95270ecc07f6 |
Eval Count | 0 |
Decode Time | 90 ms |