mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Expand debug page.
This commit is contained in:
parent
dc063a1587
commit
dac4f23d51
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -7,3 +7,5 @@ I am running Firefly III version x.x.x
|
|||||||
(please include if this problem also exists on the demo site)
|
(please include if this problem also exists on the demo site)
|
||||||
|
|
||||||
#### Other important details (log files, system info):
|
#### Other important details (log files, system info):
|
||||||
|
|
||||||
|
Please visit the /debug page to get extra debug information.
|
@ -35,6 +35,7 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Routing\Route;
|
use Illuminate\Routing\Route;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Monolog\Handler\RotatingFileHandler;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use Route as RouteFacade;
|
use Route as RouteFacade;
|
||||||
use Session;
|
use Session;
|
||||||
@ -88,15 +89,36 @@ class HomeController extends Controller
|
|||||||
Session::put('end', $end);
|
Session::put('end', $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayDebug()
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function displayDebug(Request $request)
|
||||||
{
|
{
|
||||||
$phpVersion = PHP_VERSION;
|
$phpVersion = PHP_VERSION;
|
||||||
$now = Carbon::create()->format('Y-m-d H:i:s e');
|
$phpOs = php_uname();
|
||||||
$extensions = join(', ', get_loaded_extensions());
|
$interface = php_sapi_name();
|
||||||
$drivers = join(', ', DB::availableDrivers());
|
$now = Carbon::create()->format('Y-m-d H:i:s e');
|
||||||
|
$extensions = join(', ', get_loaded_extensions());
|
||||||
|
$drivers = join(', ', DB::availableDrivers());
|
||||||
$currentDriver = DB::getDriverName();
|
$currentDriver = DB::getDriverName();
|
||||||
|
$userAgent = $request->header('user-agent');
|
||||||
|
|
||||||
return view('debug', compact('phpVersion', 'extensions', 'carbon', 'now', 'drivers','currentDriver'));
|
// get latest log file:
|
||||||
|
$logger = Log::getMonolog();
|
||||||
|
$handlers = $logger->getHandlers();
|
||||||
|
$logContent = '';
|
||||||
|
foreach ($handlers as $handler) {
|
||||||
|
if ($handler instanceof RotatingFileHandler) {
|
||||||
|
$logFile = $handler->getUrl();
|
||||||
|
if (!is_null($logFile)) {
|
||||||
|
$logContent = file_get_contents($logFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// last few lines
|
||||||
|
$logContent = 'Truncated from this point <----|'.substr($logContent, -4096);
|
||||||
|
|
||||||
|
return view('debug', compact('phpVersion', 'extensions', 'carbon', 'now', 'drivers', 'currentDriver', 'userAgent', 'phpOs', 'interface', 'logContent'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,22 +4,40 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<p>
|
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;">
|
||||||
Please copy and paste the content of this textbox into a (new) Github issue. Don't change anything, don't add enters or something.
|
If you are running into problems, you can use the information in this box as debug information. Please copy-and-paste into a new
|
||||||
|
or existing <a href="https://github.com/firefly-iii/firefly-iii/issues">Github issue</a>. It will generate a beautiful table that can
|
||||||
|
be used to quickly diagnose your problem.
|
||||||
</p>
|
</p>
|
||||||
<textarea rows="30" cols="80">
|
<textarea rows="30" cols="100" name="debug_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:8pt;">
|
||||||
Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION }}**.
|
Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION }}**.
|
||||||
|
|
||||||
| Variable | Content |
|
| Variable | Content |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| FF version | {{ FF_VERSION }} |
|
| FF version | {{ FF_VERSION }} |
|
||||||
| PHP version | {{ phpVersion }} |
|
| PHP version | {{ phpVersion }} |
|
||||||
|
| Host | {{ phpOs }} |
|
||||||
|
| Interface | {{ interface }} |
|
||||||
| Loaded extensions | {{ extensions }} |
|
| Loaded extensions | {{ extensions }} |
|
||||||
| UserID | {{ Auth.user.id }} |
|
| UserID | {{ Auth.user.id }} |
|
||||||
| DB drivers | {{ drivers }} |
|
| DB drivers | {{ drivers }} |
|
||||||
| Current driver | {{ currentDriver }} |
|
| Current driver | {{ currentDriver }} |
|
||||||
| Using Sandstorm? | {% if SANDSTORM == true %}yes{% else %}no{% endif %} |
|
| Using Sandstorm? | {% if SANDSTORM == true %}yes{% else %}no{% endif %} |
|
||||||
{% if SANDSTORM == true %}| Sandstorm anon? | {% if SANDSTORM_ANON == true %}yes{% else %}no{% endif %} |{% endif %}
|
{% if SANDSTORM == true %}| Sandstorm anon? | {% if SANDSTORM_ANON == true %}yes{% else %}no{% endif %} |{% endif %}
|
||||||
|
| User agent | {{ userAgent }} |
|
||||||
|
</textarea>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;color:#a00;">
|
||||||
|
You may also share the content of the box below. You can also copy-and-paste this into a new
|
||||||
|
or existing <a href="https://github.com/firefly-iii/firefly-iii/issues">Github issue</a>. However, the content of this
|
||||||
|
box may contain private information such as account names, transaction details or email addresses.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<textarea rows="30" cols="100" name="log_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:7pt;">
|
||||||
|
```
|
||||||
|
{{ logContent }}
|
||||||
|
```
|
||||||
</textarea>
|
</textarea>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user