Missing libraries and tools

If I good understand how Logger works it will give me only data from: Logger.* methods like: Logger.info, right?
What about catching:

raise ArgumentError, message: "Bad argument!"

and deprecated warnings?
Of course I mean to only catch and log that situations (not rescue).

1 Like

Those can be caught too. Heck you can plug in :sasl and log everything OTP related if you want (that would be noisy ^.^).

1 Like

It could be one config that selects logger module callback (also accept Lists). By default it could save to files (like I described), but instead of this it could send email or do both.

defmodule Example.MyLogger do
  def log_callback(db_item) do
    # read config + format log based on config + save to log file
    # or:
    # read config + format log based on config + send to 3rd party site
    # or:
    # read config + format log based on config + send by e-mail
  end
end
1 Like

Can you link to tutorial and/or example project?
I found this example of custom logger implementation.
I want to combined Logger and OTP related messages into a single interface, to easily manage them.
I think about fast respond for production bugs or split console output into separated log files in developer mode, so we do not need to scroll and search data in more advanced cases (bugs + debugs + deprecated warning + Ecto messages).

1 Like

At http://elixir-lang.org/docs/stable/logger/Logger.html you can see options like :handle_otp_reports and :handle_sasl_reports and such, it is built in functionality. :slight_smile:

1 Like

Thanks, I missed that. I need to check what Logger returns (check if it good splits data, so I can read and fill to my example table without parsing plain String error messages).
Edit: I also updated my post with this idea (added source Atom, so we can pattern match if logs are going from Ecto or not, but at now I donā€™t know if itā€™s possible - I need to check that).

1 Like

I will put up a repo up on github and we can tryout a few ideas and move the conversation over to there.

Any naming ideas?

2 Likes

Elixir Libraries Discussion

A list of Open Source libraries and ideas for Elixir. See where your help and knowledge are needed or add your propositions for new libraries.

Issues with labels like:

  1. Idea
  2. Research
  3. In progress
  4. Initial release
  5. Enhancing - between Initial release and Version 1.0
  6. Version 1.0 - like first version with prepared public API
    Note: of course there is also work on next versions (bigger than 1.0), but I think itā€™s offtopic
  7. Need hands
  8. Need knowledge
  9. Need fix deprecations - a library created for old version of Elixir/OTP
  10. Need rework - in case when used old API and new better (performance) is available
  11. Need next version of dependency
  12. Need next version of Elixir - to use some new Elixir public API

and more ā€¦

What do you think about it?

1 Like

I have thought a couple of times in the past about building a website that allows for the discovery of open source projects that require additional help. I believe this would help the maintainers and lower the bar for new contributors. I have heard a few times that it can be a struggle to find entry level contributions to make.

I think before we go to far we need some more active projects and contributors ideally.

2 Likes

Thereā€™s already CodeTriage that does this. up-for-grabs does the same, but is aimed specifically at newbies.

5 Likes

I havenā€™t seen these before, thatā€™s really cool!

1 Like

Well, maybe we can also put BountySource on that list?

2 Likes

Indeed, seems like a great site. Oddly enough Iā€™ve never used any of these, but Iā€™ve got a very strong urge at the moment to do it.

2 Likes

I am in the same boat, if I could just find some spare time!

Over the course of the last few months, Iā€™ve actually made quite a bit of progress on various Google API clients:

  • Goth ā€” a library for authentication via Google Cloud APIs
  • Diplomat ā€” a library for Googleā€™s Cloud Datastore
  • Kane ā€” a library for Googleā€™s Pub/Sub

While at Elixir Conf, I spoke to an engineer who is who is on Googleā€™s Ruby team about my libraries; my hope would be that they might at some point be christened the official Google libraries for Elixir, but only time will tell.

If youā€™re looking to use Google APIs in Elixir, please check out the above linked libraries and let me know what you think.

9 Likes

Those look great @peburrows.

What triggered my initial thought about a Google API client was the need to access my Google Drive storage and I couldnā€™t see any libraries for that. I havenā€™t looked at this in great detail but at a glance it seems that Google appear to auto generate their client APIā€™s (Ruby Client) using their Discovery Service.

3 Likes

Iā€™m interested in support online storages too, but not in near future.
Think about CMS with upload videos from and to Google Drive or M$ OneDrive.
I would love to use multiple storages with same API (in Elixir) and same with Payments. Just select a payment type and do what you want!
:smile:

3 Likes

Great idea, I have added the MS graph API to the wiki.

Iā€™m also planning on starting work on the PayPal integration at some point soon and looking for anyone interested in helping out!

2 Likes

Hi @swelham Thatā€™s a really cool thread.

I am a self taught programmer and I think have just surpassed newbie level :slight_smile: So donā€™t be harsh about my idea.
I find that there is a need for some aggregated Auth/User/Account library and I am not talking about competing with Guardian, but building on top of it.

We can all build email/password functionality with available tools quite easily. But most of real world projects require either phone-based authentication mechanism or social-based and sometimes both (for instance if you want to connect facebook account on top of already existing phone-based authentication). And there are quite a bit of stuff you need to take care of in both of these cases. For instance in phone-based authentication system one might want to

  1. store normalized contacts from multiple platforms
  2. when someone registers inside the system, get friends/contacts notified
  3. when connecting facebook account we need to somehow integrate that with other parts
  4. etc

For someone it might be easy, but not for me. I have been developing auth and account umbrella apps as part of my first elixir project for about 3 months now and spent quite a lot of time on these. I wished that there was a library that makes it easy to do or may be a set of libraries. Otherwise I am sure that not only me but a lot of other newbies and small groups of developers are just rebuilding this functionality over and over again.

So if anyone would like to help me build that I am happy to help and share everything I have on this problem.

3 Likes

Add library to integrate with social account is good idea, but rest (for example notify friends) needs to be designed in program that use this library. Otherwise privacy policy would depend on library restrictions (for example someone want keep user privacy and donā€™t allow that feature).
It could be special topic for that: ā€œMissing support 3rd party servicesā€.
At now we have:

  1. Storage services (like Google Docs)
  2. Payment services (like PayPal)
  3. Social/Auth services (like Facebook)

Tip: As you can see we have special rules for ordered list in posts on this forum :smile:

1 Like