Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlueScreen: add renderToFile #130

Closed
wants to merge 1 commit into from
Closed

BlueScreen: add renderToFile #130

wants to merge 1 commit into from

Conversation

@Vrtak-CZ
Copy link
Contributor

Vrtak-CZ commented Jan 3, 2016

We are using Tracy with Monolog and we only need "render" bluescreen to file. So I add renderToFile method to BlueScreen (code moved from Logger).

I'm not sure with method name. You maybe have better idea.

@fprochazka

This comment has been minimized.

Copy link
Contributor

fprochazka commented Jan 3, 2016

Nice 👍

@dg dg force-pushed the nette:master branch from 622221f to 44bbe3c Jan 11, 2016
*/
public function renderToFile($exception, $file)
{
if ($handle = @fopen($file, 'x')) { // @ file may already exist

This comment has been minimized.

Copy link
@dg

dg Jan 13, 2016

Member

IMHO this conditions should stay in Logger.

This comment has been minimized.

Copy link
@Vrtak-CZ

Vrtak-CZ Jan 14, 2016

Author Contributor

Ok but if I move that to Logger I must pass resource to this method from Logger or we should have "copy&paste" code in Logger and in this method. But file as resource for this method doesn't looks good for me (it's just feeling).

Do you have better idea?

This comment has been minimized.

Copy link
@dg

dg Jan 18, 2016

Member

File should be opened twice, via @fopen($file, 'x') in logger and fopen($file, 'w') in Bluescreen.

@dg dg force-pushed the nette:master branch from 940eb3b to eee6350 Feb 8, 2016
@dg dg force-pushed the nette:master branch from eba308b to 30fb9ea Feb 23, 2016
@dg dg force-pushed the nette:master branch from fba3e9c to e1e204c Mar 22, 2016
@dg dg force-pushed the nette:master branch 4 times, most recently from 5dd8d3e to 5ecd8e7 Apr 21, 2016
@dg dg force-pushed the nette:master branch from b5a0786 to e0e5557 May 16, 2016
@dg dg closed this in 360ccf8 May 17, 2016
dg added a commit that referenced this pull request May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.