question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow multiple sinks to be used

See original GitHub issue

I would love if multiple sinks could be used, and not just the one. For me, I’d like to be able to print to stdout/stderr as is the default, while also sending the messages to a custom sink.

I would image it would be easiest to allow logger.start to accept a list that would be called in order.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Delgancommented, Dec 9, 2018

Yeah, that’s a bit confusing. I would think logger.sink would be most descriptive.

@volfco That would collide with the sink argument itself.

Yep, I think the start method is a bit confusing, too. Maybe logger.add_sink would be a more descriptive alternative?

@samuelhwilliams Thanks for confirming that the method name is confusing, I will change it as soon as possible then!

I prefer not to repeat “sink” in method name, it should be a simple verb. Once you know Loguru, you know that .add() is for adding a sink, there is little point to affix “sink” again. The issue is when you discover Loguru, you see logger.start() and may be confusing by thinking that this has to do with starting the logger, while it’s about the sink.

So I could go with replacing start() / stop() by add() / remove() maybe.

0reactions
Delgancommented, Dec 12, 2018

I released a new version 0.2.2 which deprecate start() and stop() in favor of add() and remove().

I hope this will be less confusing. Thanks for having reporting this. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Case for 2 Kitchen Sinks - Houzz
Having two kitchen sinks allows one to be the dedicated cleanup sink and the other to be the prep sink. With this division...
Read more >
Can multiple sinks read from same channel or how to load ...
1 Answer 1 ... Multiple Sinks can read from same channel but It is important to remember, however, that Flume can only guarantee...
Read more >
Three Compartment Sink Rules - WebstaurantStore
Important: Never use your three compartment sink for anything other than cleaning, rinsing, and sanitizing dishes. Do not permit hand ...
Read more >
Dual Mount Kitchen Sinks: What You Need To Know
Dual mount sinks can be used as drop in sinks with any countertop material. Generally, they are the only choice for kitchens with...
Read more >
Chapter 6: Lavatories and Sinks - Access Board
Clear floor A parallel approach is permitted at kitchen sinks (i.e., sinks used for food preparation) located in breakrooms, kitchenettes, and similar spaces ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found