Skip to content

Stuck trying to embed a Log effect into Amazonka's flexible IO logger #250

Answered by arybczak
YourFin asked this question in Q&A
Discussion options

You must be logged in to vote

Unrelated, but using unliftStrategy from IOE for local unlifts is incorrect. The type of unlift only depends locally on the functions you're unlifting. Well, ok, not quite if you use the unlifting function out of its scope like in withLogs because who knows where it's going to end up being called, but then if SeqUnlift doesn't work, you can just use ConcUnlift for it. You can definitely use localSeqUnlift for unlifting local in LocalEnv'.

My current suspicion is that the send at the end results in the effect getting sent back to the withLogs handler via the unlift

This is correct. By sending in the local environment you're sending to the newest handler, which is most likely the one you'…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@arybczak
Comment options

@YourFin
Comment options

@YourFin
Comment options

@arybczak
Comment options

Answer selected by YourFin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants