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

No ability to disable download results #639

Closed
AladW opened this issue Apr 26, 2016 · 7 comments
Closed

No ability to disable download results #639

AladW opened this issue Apr 26, 2016 · 7 comments
Milestone

Comments

@AladW
Copy link

AladW commented Apr 26, 2016

aria2c --console-log-level=error https://aur.archlinux.org
[#18fe58 0B/0B CN:1 DL:0B]                                                                                                                                    
Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
18fe58|OK  |    10KiB/s|/home/archie/index.html

Status Legend:
(OK):download completed.

On error:

$ aria2c --console-log-level=error https://aur.archlinux.ofewewfrg

04/26 13:01:27 [ERROR] CUID#7 - Download aborted. URI=https://aur.archlinux.ofewewfrg
Exception: [AbstractCommand.cc:345] errorCode=19 URI=https://aur.archlinux.ofewewfrg
  -> [AbstractCommand.cc:783] errorCode=19 CUID#7 - Name resolution for aur.archlinux.ofewewfrg failed:Domain name not found

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
874257|ERR |       0B/s|https://aur.archlinux.ofewewfrg

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.

Both download results and errors are printed on stdout (#638), so aria2c >/dev/null wouldn't have the desired result. A workaround in scripts/pipes is to save the log to a file, and mention the user to read it. Having the error printed directly, preferably to stderr, would be more effective.

@tatsuhiro-t
Copy link
Collaborator

Because of the backward compatibility, we cannot change stdout to stderr to display the download result. You may redirect stderr to stdout, and redirect stdout to file or /dev/null as a workaround.

@AladW
Copy link
Author

AladW commented Apr 26, 2016

Well, adding a switch to disable the download results wouldn't break backwards compability.

@tatsuhiro-t
Copy link
Collaborator

tatsuhiro-t commented Apr 26, 2016

We have --download-result option. It currently accepts "default", and "full". Perhaps, we can add "hide" (or something like that) to disable download result.

@AladW
Copy link
Author

AladW commented Apr 26, 2016

That sounds good to me.

@tatsuhiro-t
Copy link
Collaborator

Fix committed via aa863fa

@AladW
Copy link
Author

AladW commented Apr 26, 2016

Works, thank you!

@AladW AladW closed this as completed Apr 26, 2016
@tatsuhiro-t tatsuhiro-t added this to the v1.23.0 milestone Apr 26, 2016
@sergeevabc
Copy link

$ aria2c https://domain.suffix/file.ext --checksum=sha-256=… --console-log-level=warn --download-result=hide

01  03/30 17:50:56 [ERROR] Checksum error detected. file=C:/…/file.ext                            
02                                                                                                
03  aria2 will resume download if the transfer is restarted.                                      
04  If there are any errors, then see the log file. See '-l' option in help/man page for details. 

How to hide lines 03–04? They annoy me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants