JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 06.01.2016, 01:24
epinephrine
Guest
 
Posts: n/a
Question How to set Log Level

Hi,
I am running a Linux Server on which jdownloader runs in headless mode.

How do I set the logging level?! I couldn't even find the logging level in the graphical menu. I also grep'd for the word log on the cfg folder but still couldn't find the setting for the log level...
It seems to be set to ALL or FINE or something like that on my fresh JDownloader installation. I run JDownloader as a systemd service and my journalctl gets terribly spammed.

Please help
Reply With Quote
  #2  
Old 06.01.2016, 01:27
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,096
Default

There is no logger level that I'm aware of. JD handles what it needs to log via internal means (logs goto "installpath/logs/"). You might be experiencing console outputs if you use cli start string?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 06.01.2016, 01:34
epinephrine
Guest
 
Posts: n/a
Default

My systemd service starts /usr/bin/JDownloaderHeadless, which in turn runs exec java -Djava.awt.headless=true -jar JDownloader.jar -norestart. This is how the jdownloader AUR package on my Arch Linux system imagined it And this causes the output of the command to be forwarded to journalctl. How can I disable this forwarding and only have the logs written to the logs file?
Also, IMO it would make a lot of sense to have log levels, that's basic in every application! Why doesn't JDownloader have it (any more)? I remember that there was a log level once...
Reply With Quote
  #4  
Old 06.01.2016, 01:35
epinephrine
Guest
 
Posts: n/a
Default

I mean, yes, I can just append 2>&1 > /dev/null but that's so inelegant
Reply With Quote
  #5  
Old 06.01.2016, 02:28
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,096
Default

JD has always had internal logging, debug or normal and that is still the case. Console output can also be outputed say on windows if you use 'java' binary instead of 'javaw' within cmd or you can use > and send to file. In linux/unix for memory you start with standard java binary, this most likely gets console outputs by default. I assume that's what you're experiencing as no examples or full logs have been provided of the offending output. Best to wait for Jiaz to respond (should be today during German Business hours), as he every day user and develops under linux and should be able to give proper answer.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #6  
Old 06.01.2016, 11:08
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

Please pipe stdout and stderr to files if you need them. There is no way to disable console output.

java -Djava.awt.headless=true -jar JDownloader.jar 2>&1 > /dev/null
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 06.01.2016, 11:34
epinephrine
Guest
 
Posts: n/a
Default

Piping stderr and stdout to /dev/null or to files is what I already offered as a fall-back solution in post #4. But I do want some logging, namely, warnings and above, to show up in journalctl. For this, the log level would have to be set. Why did you guys decide to abandon log-level setting? I just don't understand why you would do that for any application.

Now I could pipe the output through grep or awk and filter out logs of the desired type, but that's not the same as letting the application only emit warnings and above, which would also benefit performance.
Reply With Quote
  #8  
Old 06.01.2016, 11:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

Because JDownloader is a very complex application that does many many things. For example an error response from a server can be log level severe but in the end the plugin handles it correct and no error at all. JDownloader logs are primarily for us developers. The log was never meant to be a source of information to end users. We do not use different loglevels because the loglevel can change over time. And the logs are not formatted to be of any help for a normal user. There is no default error message for error X, Y, Z that you can use for grep/any tool.

Logging introduces no performance issue. When you remove the stderr/stdout, nothing gets written at all to them.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 06.01.2016, 14:58
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,096
Default

"abandon" implies that we previously had given feature and I don't recall we ever having so.

As I stated earlier the logging level setting in older JD was internal use only (either it caught everything or it didn't at all). It was always for its own log system not the operating system and or "journal" daemon, as far as I recall.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:44.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.