Expand my Community achievements bar.

SOLVED

Curl Command to download Error LOG

Avatar

Level 5

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.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

3 Replies

Avatar

Level 10

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

Avatar

Correct answer by
Employee Advisor

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

Avatar

Level 7

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