Open mkg20001 opened 5 years ago
@mkg20001 Will a quick'n'dirty solution of adding a CLI option work, like what we have now with dist_type
?
This is kindof hard to do, since the service gets called in a non-standard way that does not allow any command line arguments.
As I said, I already have a quick'n'dirty solution (the patch I mentioned above)
Something more robust would be better, that's why I'm posting this.
A possible fix would be to use an option in zeronet.conf for that. Something like disable_console_logger
and disable_file_logger
Will the following work:
import logging
config.initLogging(console_logging=len(logging.root.manager.loggerDict) == 0)
?
@mkg20001 BTW, please set dist_type
to kiwi
or mobile
or something. That'll make it easier to develop cross-platform sites (namely, administrating pages). You can set it either with CLI or with zeronet.conf (under [global] section)
@imachug the fix detects other loggers and disables console logging in that case, right? Then it's perfect! :star:
For dist_type
: I didn't know this existed :sweat_smile: Which one does the zeronet team prefer? kivy
to indicate the kivy builds or android
which specifially defined the platform. or something more specific such as android_9
, or less such as mobile
dist_type
is source
for raw Git repository (read: built from source) and bundle_x64
for ZeroNet bundle (not sure about underscore though, and whether it's x86
on 32-bit platforms). I've recommended people who make their own launchers to use bundle
. I think using kivy
makes most sense, and you'd use android
as platform
in serverInfo
.
I've set it to kivy
. Or should I use bundle_kivy
?
Actually, I'd leave bundle*
to the official zeronet.io bundle, so I'd use kivy
instead.
I have added new a --console_log_level off
config option to disable the console logging:
https://github.com/HelloZeroNet/ZeroNet/commit/7b9b48e62de8cd3de8c9368b16ad81185b5233e9
Right now the dist_type is used in the updater script to decide what runtime should be downloaded/updated beside the platform-independent py3 source code.
I recommend to use kivy_android
or bundle_kivy_android
as it could be possible that kivy will be used for other platforms as well.
Ok, using kivy_android
makes sense now, I think. Also thanks for the commit, I believe this issue can be closed now.
Offtopic: could you check your ZeroMail please?
I have added new a --console_log_level off config option to disable the console logging:
This is kindof hard to do, since the service gets called in a non-standard way that does not allow any command line arguments.
@HelloZeroNet We could have used the solution from https://github.com/HelloZeroNet/ZeroNet/issues/2139#issuecomment-520353194, since this looks like a solid workaround
The proposed solution is kindof useless, unless I can set it via zeronet.conf
Offtopic: could you check your ZeroMail please?
Uhm, I wasn't on ZeroNet for months now
Unsure if my .bit domains are even still registered :sweat_smile:
@mkg20001 Uh, that off-topic was for nofish actually...
Step 1: Please describe your environment
Step 2: Describe the problem:
Steps to reproduce:
Observed Results:
Expected Results:
Current workarround:
I'm applying this patch:
Instead this variable could be dynamically set, based on whether or not another logger is registered