bduggan / raku-jupyter-kernel

Raku Kernel for Jupyter notebooks
Artistic License 2.0
72 stars 18 forks source link

Default log location in `/tmp` direcotry #56

Open tinmarino opened 4 years ago

tinmarino commented 4 years ago

I think most (if not all) user do not want to see jupyter.log in their current dir. It would be better to write in a OS specific /tmp directory by default

The $*TMPDIR can be used <- https://github.com/ufobat/perl6-Temp-Path/blob/master/README.md

bduggan commented 4 years ago

Hmm -- it is configurable -- https://github.com/bduggan/p6-jupyter-kernel/blob/master/README.md#logging -- I'm open to ideas for another default but $*TMPDIR or /tmp doesn't seem like a great fit since generally log files are someplace like /var/log (or under /usr/local/ or some other log directory relative to the location of the server configuration file).

tinmarino commented 4 years ago

It's an hard issue actually ! var/log is not writable by me (user). In windows it is adviced in %APPDATA% and your app (jupyter/kernels/perl6) My suggestion for default:

  1. ... jupyter/kernels/perl6/messages.log <- see the new Paths.pm6
  2. Nil so by default nothing, user do not care, only devs
  3. ./jupyter.log and I just put --logfile /tmp/p6-jupyter.log for myself

In my opinion though, the default config should make minimum: be silent, if user want verbose, he asks. So I prefer the 2 first. I don't like to get a file in my path. Currently, it has 66.000 lines of:

2020-02-29T01:44:39.828354-03:00 (7) error: Could not find symbol '&zmq_proxy'
2020-02-29T01:44:39.829828-03:00 (7) debug: heartbeat

This is one line of code but default confs are always polemic. So I'm just exposing the solutions I can implement easily.

Have a nice week - end

PS : @sumanstats, do you have an opinion about it ? PS2. Do I make a noise nothing ?

bduggan commented 4 years ago

How do other kernels do it?

tinmarino commented 4 years ago

To :

What about ~/.local/share/jupyter/kernels/perl6 ?