travelping / exometer_influxdb

Exometer reporter for InfluxDB
Mozilla Public License 2.0
36 stars 31 forks source link

Fix compilation on Erlang 19 by updating rebar.config #25

Closed TBK145 closed 8 years ago

TBK145 commented 8 years ago

The old exometer dependency had a lager dependency which did not compile on Erlang 19.

However, newer exometer versions do not have a lager dependency, so I had to add one manually, which fixed compilation on Erlang 19.

TBK145 commented 8 years ago

It just occurred to me that this doesn't work. Apparently exometer (or hut for that matter) needs an extra flag to use lager. I'm trying to find out how that has to be done.

TBK145 commented 8 years ago

It turns out I only had to add lager to the app.src

surik commented 8 years ago

Hi @TBK145, looks you use exometer_core revision with hut but there isn't capability to change the default log system without some hacks, see: https://github.com/Feuerlabs/exometer_core/issues/57

TBK145 commented 8 years ago

I saw that there is some trouble with loggers, but with this pull request exometer still uses lager right?

surik commented 8 years ago

It uses hut and hut has a capability to change it via the compile flags (SASL error_logger used by default) but I don't see any ways to set these flags for exometer_core when I use it with other applications such as exometer_influxdb or so on.

I think you did some tests with the latest exometer_core and saw its log messages but probably they are just error_logger messages translated to lager, aren't they?

Please, correct me if I'm wrong.

TBK145 commented 8 years ago

I'm not sure, but that might very well be possible.

TBK145 commented 8 years ago

I currently have a workaround where I specify the newer lager dependency in my own project. Would it be a solution to add lager 3.2.1 as a dependency to this project and use the old exometer_core ref?

surik commented 8 years ago

Lets try

TBK145 commented 8 years ago

I updated the PR, now it uses the same exometer_core commit as before, but lager 3.2.1 has been added as a dependency, so it compiles on Erlang 19.

surik commented 8 years ago

Good! Can you add some description about what you did it to overrided lager in rebar.config?

surik commented 8 years ago

And activate Erlang 19 in .travis.yml if it possible ;)

TBK145 commented 8 years ago

I added a comment to rebar.config and added Erlang 19 to .travis.yml.

surik commented 8 years ago

Thank you!