Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
d0f587f5
Commit
d0f587f5
authored
Aug 01, 2016
by
Dominik Hebeler
Browse files
Der letzte Log wird direkt aus der Redis Datenbank geholt
parent
ee9311fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdminInterface.php
View file @
d0f587f5
...
...
@@ -94,10 +94,10 @@ class AdminInterface extends Controller
public
function
check
()
{
$q
=
""
;
$
logFile
=
"/var/log/metager/mg3.log"
;
if
(
file_exists
(
$logFile
)
)
$
redis
=
Redis
::
connection
(
'redisLogs'
)
;
if
(
$redis
)
{
$q
=
exec
(
"tail -n 1
$logFile
"
)
;
$q
=
$redis
->
lrange
(
"logs.search"
,
-
1
,
-
1
)[
0
]
;
$q
=
substr
(
$q
,
strpos
(
$q
,
"search="
)
+
7
);
}
return
view
(
'admin.check'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment