Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Improves logging #30

Merged
merged 5 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/app.js": "/app.js?id=4cd65553f3baa40505e0",
"/app.js": "/app.js?id=ee4113d2e671858c7982",
"/app.css": "/app.css?id=ac312744bf7a06265c21"
}
10 changes: 9 additions & 1 deletion resources/js/screens/logs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
<div class="ml-4">
<div class="text-sm leading-5 font-medium text-gray-900 truncate">
<p class="truncate">
{{ entry.content.message.message ? entry.content.message.message : entry.content.message }}
<template v-if="entry.content.message.message">
{{ entry.content.message.message }}
</template>
<template v-else-if="entry.content.message.output">
{{ entry.content.message.output }}
</template>
<template v-else>
{{ entry.content.message }}
</template>
</p>
</div>
<div
Expand Down
20 changes: 19 additions & 1 deletion resources/js/screens/logs/show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,20 @@
</dd>
</div>

<div class="mt-8 sm:mt-0 sm:grid sm:grid-cols-3 sm:gap-4 sm:border-t sm:border-gray-200 sm:px-6 sm:py-5">
<div
v-if="entry.content.message.context && entry.content.message.context.command"
class="mt-8 sm:mt-0 sm:grid sm:grid-cols-3 sm:gap-4 sm:border-t sm:border-gray-200 sm:px-6 sm:py-5"
>
<dt class="text-sm leading-5 font-medium text-gray-500">Command</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ entry.content.message.context.command }}
</dd>
</div>

<div
v-if="!entry.content.message.output"
class="mt-8 sm:mt-0 sm:grid sm:grid-cols-3 sm:gap-4 sm:border-t sm:border-gray-200 sm:px-6 sm:py-5"
>
<dt class="text-sm leading-5 font-medium text-gray-500">Message</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ entry.content.message.message ? entry.content.message.message : entry.content.message }}
Expand All @@ -65,7 +78,12 @@
>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<div class="border border-gray-200 rounded-md bg-gray-900 text-white overflow-x-auto">
<pre v-if="entry.content.message.output" class="m-4 3rem">
{{ entry.content.message.output.trim() }}
</pre>

<vue-json-pretty
v-else
class="m-4 3rem"
:showLine="false"
:deep="4"
Expand Down
11 changes: 10 additions & 1 deletion src/Repositories/LogsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,23 @@ class LogsRepository
* @var array
*/
protected $ignore = [
'Creating storage directory',
'START RequestId',
'REPORT RequestId',
'END RequestId',
'Executing warming requests',
'Loaded Composer autoload filePreparing to add secrets to runtimePreparing to boot FPMEnsuring ready to start FPMStarting FPM Process',
'Loaded Composer autoload file',
'Preparing to add secrets to runtime',
'Preparing to boot FPM',
'Ensuring ready to start FPM',
'Starting FPM Process',
'NOTICE: fpm is running,',
'NOTICE: ready to handle connections',
'Caching Laravel configuration',
'NOTICE: exiting, bye-bye!',
'NOTICE: Terminating',
'Injecting secret',
'Killing container. Container has processed',
];

/**
Expand Down