Make some const public
Hi,
I am the owner of hedii/laravel-gelf-logger, a wrapper for laravel logging based on your repo.
Happy to see the v2 becoming stable.
You made some constants on the HttpTransport class private, is there any reason for that?
I think it should be public, because they are the default values for graylog, and i was getting these values from your repo (https://github.com/hedii/laravel-gelf-logger/blob/4310f353c771742dd9eb8034280ac64c8d6608ee/src/GelfLoggerFactory.php#L67).
This pull request change these constants from private to public.
Thanks for your work.
Hi hedii! I understand the issue and the requirement. If we provide default values "as a contract" for downstream libraries in gelf-php we could do it properly. How about we define either an uninstantiable class GraylogDefaults (abstract or private ctor) or an additional, namespaced file that carries all the Graylog2 default properties: host, port(s) for the different protocols, paths. This then becomes part of the library API and is not attached to a specific transport. I think it makes more sense, because there no 1:1 mapping between the defaults and transport implementations and also the concept of the transports is less universal than those defaults.
If we'd go with a class, we could even create static methods that spit out preconfigured transports and other objects for default Graylog2 use.
What do you think?
yes that would be great :)