Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Archiving error.log file

phalgunk3688591
Level 2
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
Opkar_Gill
Correct answer by
Employee
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
Opkar_Gill
Correct answer by
Employee
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

andrewj40704587
Level 3
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.