Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Archiving error.log file

Avatar

Level 2

Hi,

Could anyone please explain how can I archive day to day error.log file into zip file.

Thanks,

Phalgun

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Phalgun,

Archiving the log files would lie outside AEM. You could setup logs to rotate on a daily basis in AEM, then write a shell script to zip and FTP your log files to another location/server.

Regards,

Opkar

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi Phalgun,

Archiving the log files would lie outside AEM. You could setup logs to rotate on a daily basis in AEM, then write a shell script to zip and FTP your log files to another location/server.

Regards,

Opkar

Avatar

Level 3

Yeah, this definitely lies outside AEM. I would suggest you use log rotation, with an automated custom script to compact / archive an older file daily. Cron jobs would help if you're on linux, but then you also probably wouldn't use .zip.

Personally, our logs rotate and only the last 5 days are on the server. We do use Loginsight as a log aggregation tool though - it has a java agent that forwards log entries to the central loginsight server automatically, and persists the logs / data for future analysis. I would recommend looking into a log aggregation tool like that one.