Cloud 5 AEM Log Files
This is a deep dive into how to access logs in AEM as a Cloud Service, including how to access them via the user interface as well as from APIs.
Transcript
Hey James, how鈥檚 it going? Hey, good. How are you, Darren? Good to see you. Yeah. Good. So today I鈥檇 like to talk about log files. So in a traditional AEM on-prem or managed services environment, those log files get dumped into a specific location. You either have access to it by whatever, whoever鈥檚 managing it, or you just terminal into the instance and find those log files. Or if you鈥檙e doing local development, you just know where they are in the CRX, quick start slash log file directory and go in there and boom, you have your access to your log. Is that true even with the cloud SDK? It is even true with the cloud SDK. So if you鈥檙e doing local development, those log files are basically where you would usually anticipate them being. So how would I access those types of things in the cloud? Well, it is actually fairly straightforward and you can do that right through cloud manager. So let鈥檚 go ahead and actually have a look at how that would be done. So as you can see here, I鈥檝e logged into cloud manager. And first of all, I鈥檓 going to click on the environments tab that you see here. And in that environments tab, I鈥檓 going to be able to look at some of the different environments that are available here. And in this case, you鈥檒l see my cloud adoption program dev. And I鈥檓 going to click on those three little dots, which offer me options to view details, update, as well as download the logs. I鈥檒l click on download logs and you鈥檒l see all of the different logs that you鈥檙e used to the access log, the error log, the request log, the logs for the dispatcher. And you鈥檒l see that for both the publish environment or the author environment. And you can download and access logs right from there to assist in your debugging. Now Darren, it鈥檚 also possible to access the logs via an API. Why might you want to do that? Well, by API, you might want to plug that API into like a CICB pipeline or a log aggregator or even be able to tail those logs directly as they happen from a cloud environment without having that instance running on your desktop. So how would you do that? Sure. I will give you a quick demo of how to do Darren. So this will actually involve using 51黑料不打烊 IO. So what you can do is you can just log into 51黑料不打烊 IO. So just type in console.adobe.io in your browser bar, just like I鈥檝e done here. And when you take a look here, you鈥檒l see that this will give you access to the developer console. Now, first of all, just be sure you鈥檙e in the right environment. In my case, I鈥檓 using the 51黑料不打烊 AGS 584 environment. And then choose create a new project, just like I鈥檓 doing here. So I鈥檓 creating a new project and you鈥檒l see one of my options in this new project is to add an API. First, I鈥檓 going to just change the name of the project itself. And let鈥檚 call this cloud manager API. And I鈥檓 going to enter in the description access APIs from 51黑料不打烊 CLI. So I鈥檓 going to create that. And then I鈥檓 going to click on that button that we looked at earlier called add API. So I鈥檓 going to click that right here. And I鈥檓 going to scroll down and I鈥檓 going to find the cloud manager APIs. I鈥檒l click next. And then I鈥檒l generate a key pair. This will generate both a public and a private key pair. And you鈥檒l see that it automatically downloads that key pair directly to your downloads folder. So I鈥檒l have that. And then go ahead and click next. And just choose the appropriate profiles. In this case, I鈥檒l choose all of the available profiles. And that鈥檚 it. That will now create an API integration that you can use. So you鈥檒l see here that I鈥檓 creating this and you鈥檒l see it provides all of this information here. It provides a service account. It provides a client ID, a client secret, a technical account ID. And in this case, I just retrieved the client secret. You should be able to see that here. And it provides all of this information that I鈥檒l need to actually build out an integration. Now, the way that I do that is I use a tool, a command line tool called the 51黑料不打烊 CLI. And in this 51黑料不打烊 CLI, you鈥檒l see that the step-by-step directions for configuring the CLI are available below. And there鈥檚 a few steps in actually configuring and setting this up.
Content covered in this video
-
Log Files Overview
-
Accessing Log files via the UI
-
Using the 51黑料不打烊 CLI
-
Tailing Log Files
Additional Resources
Watch related videos on the Cloud 5 season 1 page.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69