contributte / monolog

:memo: Best logging support into Nette Framework (@nette)
https://contributte.org/packages/contributte/monolog.html
MIT License
23 stars 6 forks source link

TracyProcessor #4

Closed mabar closed 5 years ago

mabar commented 5 years ago

Get exception from context and create tracy bluescreen for it.

Some kind of storage would be nice, so user is not forced to use local filesystem. (same for #3)

JanTvrdik commented 5 years ago

Get exception from context and create tracy bluescreen for it.

This can be done with Tracy\Bridges\Psr\TracyToPsrLoggerAdapter. See https://github.com/contributte/monolog/issues/6

Some kind of storage would be nice, so user is not forced to use local filesystem. (same for #3)

This can be done with https://github.com/mangoweb-backend/monolog-tracy-handler.

mabar commented 5 years ago

monolog-tracy-handler requires bluescreen to be physically available in local filesystem, am I right? I would also like to support read-only deployments and configurations which don't use default Tracy\Logger at all, so I would prefer this approach

$bs = new BlueScreen();
ob_start();
$bs->renderToFile($exception, 'php://temp');
$contents = ob_get_contents();
JanTvrdik commented 5 years ago

Without writing to local filesystem you loose the built-in de-duplication (i.e. single error on a popular site can generate many GB of data) and also you need more memory.

mabar commented 5 years ago

You are right, better drop bluescreens completely for read-only deployments.