nella / monolog-tracy

Tracy BlueScreen handler for Monolog
Other
7 stars 6 forks source link

use same hashes for file names as Tracy #5

Closed VasekPurchart closed 6 years ago

VasekPurchart commented 6 years ago

When this library was created there was no public API in Tracy to get the resulting filename without generating it first. That is why a copy of this algorithm was here AFAIK.

Since then the original implementation was changed though, so now the produced hashes are incompatible with the ones produced by Tracy.

I was solving the same thing in the TracyBlueScreenBundle integration and since I was expecting such an incompatibility, I was using reflection originally to hack around it. Fortunately since Tracy 2.4 this method is public, so it is much better to use it directly.

Since here the class is extened and some more functionality and API was added I had to use a workaround, but I still think it is better.

Also I checked the bundle and most of the different API is not used, so this might be room for future improvement in further PRs.

mhujer commented 6 years ago

Thanks 👍