123456789101112131415161718192021222324252627 |
- <?php
- namespace Tests\Common\Http\Controllers;
- use Modules\Common\Http\Controllers\OptionController;
- use Modules\Common\Support\Trace\TraceContext;
- use PHPUnit\Framework\TestCase;
- class OptionControllerTest extends \Tests\TestCase
- {
- public function testIndex()
- {
- $res = $this->get('http://localhost/api/options/xiaoming');
- // $res->dump();
- dump(app(TraceContext::class)->getTraceInfo());
- dump(app(TraceContext::class)->getTraceInfo());
- dump($info1 = app(TraceContext::class)->getTraceInfo());
- $channel = \Log::build([
- 'driver' => 'daily',
- 'path' => storage_path('logs/aa.log'),
- 'level' => 'debug'
- ]);
- \Log::stack([$channel])->info('hellow', ['traceInfo' => $info1]);
- \Log::stack([$channel])->debug('hellow', ['traceInfo' => $info1]);
- }
- }
|