cancel
Showing results for 
Search instead for 
Did you mean: 

No proper console logs available when downloading from Commerce Could

Hello Experts,

I want to download old logs from SAP commerce cloud, so I have followed the link the below link. There were no logs related java class and like console Kibana. How do I download proper old logs ?

Downloading Commerce Logs using Microsoft Azure Storage Explorer | SAP Help Portal

Accepted Solutions (0)

Answers (3)

Answers (3)

mansurarisoy
Contributor

You can filter the logs with prefix as in the screenshoot. There should be multiple log files per day.

After downloading the log within the correct time frame (times are in UTC) you need to unzip the files.

After unzipping, you should see the logs in JSON format

It's a little bit hard to read since they are in JSON format, but you should find every log within these files.

Hope this helps

andyfletcher
Active Contributor
0 Kudos

As stated in another answer they are the logs but as compressed JSON. They contain all logs that you would normally see in Kibana so you need to filter them if you only want console logs.

If you want to filter and format them as text you can use something like jq

e.g.

xz -dc kubernetes-202212160836 | jq -r '. | select(.kubernetes.labels["app.kubernetes.io/name"] == "hybris" and .logs.origin != "access-log") | .logs | (.instant.epochSecond|todate) + " " + .level + " " + .loggerName + " " + .message' | less

xz decompresses the file (it's not using zip compression as stated in another answer)
then pipe to jq and output "raw" (-r)
filter to logs originating from hybris that aren't access-logs
output the date, log level, logger name and message fields

You can just have a look at the formatted json itself with something like

xz -dc kubernetes-202212160836 | jq -C '.' | less -R
beastyisnt
Participant
0 Kudos

varunkumarug278 Tagging you on this.