Curl Command to download Error LOG | Community
Skip to main content
TheBigRed
January 7, 2016
Solved

Curl Command to download Error LOG

  • January 7, 2016
  • 3 replies
  • 2451 views

Is there a way to do this? Due to the amount of traffic going into AEM with alot of assets and such.

It's hard to troubleshoot if some problems occur since the logs take a long time to load up.

Is there a better option as to using curl command to just download the log itself?

 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

I wouldn't access the logfile through the webconsole, but rather ask the ops team to provide you direct access to the logfiles (either direct access to the filesystem using shell, or copying them to a dedicated logserver, ... there are many ways).

Jörg

3 replies

Sham_HC
January 7, 2016

I would recommend  use scp to copy file from remote server to your local.  The hackaround that can used is [1] which i don;t advise.

[1]    http://host:port/bin/crxde/logs?tail=400

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
January 7, 2016

I wouldn't access the logfile through the webconsole, but rather ask the ops team to provide you direct access to the logfiles (either direct access to the filesystem using shell, or copying them to a dedicated logserver, ... there are many ways).

Jörg

AnkurAhlawat-1
January 8, 2016

I completely agree with Jorg & Shayam , its always better & preferable to use shell or winscp to download log files from server.

But still if you want to download log files using curl then below are the curl commands.

Curl command to copy file from one location to another locally

curl file: ///path to source file -o /path to destination

Curl command to download file from remote server

curl -u user:pass -O ftp://remoteurl/download.zip

As mentioned by shayam you can view error log through web console , If you want to download it using curl then below is the command, but its not recommended.

curl -u admin:admin http://host:port/bin/crxde/logs?tail=400 > error.html

View more AEM curl commands

regards,

Ankur