mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Add logs
This commit is contained in:
1 parent
f482d96225
commit
c2bdbbe1ec
10 files changed
+80
-16
No files matched your search
@@ -16,6 +16,7 @@ use Utopia\App;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Validator\JSON;
|
||||
use Utopia\Validator\Text;
|
||||
use Utopia\Logger\Log;
|
||||
|
||||
App::get('/v1/graphql')
|
||||
->desc('GraphQL endpoint')
|
||||
@@ -292,6 +293,10 @@ function processResult($result, $debugFlags): array
|
||||
App::shutdown()
|
||||
->groups(['schema'])
|
||||
->inject('project')
|
||||
->action(function (Document $project) {
|
||||
->inject('startTime')
|
||||
->inject('log')
|
||||
->action(function (Document $project, float $startTime, Log $log) {
|
||||
$log->addExtra('GraphQLShutdownStart', \strval(\microtime(true)));
|
||||
Schema::setDirty($project->getId());
|
||||
$log->addExtra('GraphQLShutdownEnd', \strval(\microtime(true)));
|
||||
});
|
||||
Reference in new issue
Block a user