Closed Whizboy-Arnold closed 1 year ago
Hi @Whizboy-Arnold
It seems you commented out the correct namespace in your custom extended regex class.
namespace YorCreative\Scrubber\RegexCollection;
is not the correct namespace.
I point you to how the strategy pattern is instantiating the custom class here:
In regards to your CHECK FOR COVERAGE:
image -- I'm not entirely sure what you did while debugging but I added the same dd's in on a fresh laravel install w/ just a vanilla version of this package.
In regards to defining what regex classes you want in your configuration file (I will make a note to update the readme to clearly say this), you cannot have a wildcard + classes. This is because of how the strategy pattern handling this is working. If you are not familiar with strategy patterns, I refer you to my favorite design pattern website.
I do see a misleading bug though with that being said in the custom regex class loader. It is currently always loading your custom classes, without regard to the config regex_loader array if there are any custom regex classes in the App\Scrubber\RegexCollection
namespace. I will get a PR going to update this to respect what classes are defined in the regex_loader. With that being said, this is not a functionality breaking bug and the scrubber just loads all the custom classes, if any, always.
For example:
Here the core regex class loader is respecting what is defined in the config regex_loader field.
Here all the custom classes that are defined in the App\Scrubber\RegexCollection
namespace are being loaded whenever it detects any.
If you still are having issues, you can find me (@yorda) in my discord server. Here is an invite link: https://discord.gg/qRmsXmmd
hello, could you open the discord I still have problems with the tool working
hello, could you open the discord I still have problems with the tool working
@Whizboy-Arnold https://discord.gg/67MqSuu7bx
It seems after the latest update the tool broke, I thought it was not seeing the parts to redact in the logs yet but no. This is with the vanilla configuration. What is going on well is now i can get my logs on any channel and especially, papertrail, Yes this is good: but now it seems that it stopped redacting be it on local ie single channel or papertrail. Mark you this time I even tried to directly fix it to the RegexCollection class as a hack like last time, it seems just not getting invoked in the first place. Please check out on it.
Also am writing a custom reducter This is want to work:
This is tried with a very simple regex as last time:
However I suppose it wont work unless the above is resolved.
Trying to debug what could be wrong i added several dd through out the code, maybe you could:
CHECK FOR COVERAGE:
it seems the code is not even reaching this point, that
dd("registering") //check above image
is not called on the callback unless am wrong.