Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging bug when import Pluto inside notebook #905

Closed
fonsp opened this issue Feb 8, 2021 · 1 comment
Closed

Logging bug when import Pluto inside notebook #905

fonsp opened this issue Feb 8, 2021 · 1 comment
Assignees
Labels
display & PlutoRunner & AbstractPlutoDingetjes.jl

Comments

@fonsp
Copy link
Owner

fonsp commented Feb 8, 2021

Originally posted by @joshday in #659

I recently discovered that after using Pluto inside a notebook, it would freeze after 10 @info statements. I can reproduce it with a simple notebook:

# Cell 1
using Pluto

# Cell 2
for i in 1:20
    @info i
end

The last thing I see in my terminal is [ Info: 10 and the notebook becomes unresponsive.

I'm on a Mac/Safari/Pluto v0.12.20


I don't think it's common to have using Pluto in a notebook. In my particular case I was creating HTML files based on user input and borrowing the CSS files in joinpath(pathof(Pluto), "frontend") so that the style of these files matched the notebook.

Originally posted by @joshday in #659 (comment)

@fonsp
Copy link
Owner Author

fonsp commented Feb 8, 2021

Thanks! (Note to self) I think this is because

function __init__()
if Distributed.myid() != 1
old_logger[] = Logging.global_logger()
Logging.global_logger(PlutoLogger(nothing))
end
end

should be in a function triggered by the server, not in __init__

@fonsp fonsp self-assigned this Feb 8, 2021
@fonsp fonsp added the display & PlutoRunner & AbstractPlutoDingetjes.jl label Feb 8, 2021
@fonsp fonsp closed this as completed in 5b22f9b Apr 12, 2021
pankgeorg pushed a commit that referenced this issue Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display & PlutoRunner & AbstractPlutoDingetjes.jl
Projects
None yet
Development

No branches or pull requests

1 participant