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’s it going? Hey, good. How are you, Darren? Good to see you. Yeah. Good. So today I’d 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’s managing it, or you just terminal into the instance and find those log files. Or if you’re 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’re 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’s go ahead and actually have a look at how that would be done. So as you can see here, I’ve logged into cloud manager. And first of all, I’m going to click on the environments tab that you see here. And in that environments tab, I’m going to be able to look at some of the different environments that are available here. And in this case, you’ll see my cloud adoption program dev. And I’m going to click on those three little dots, which offer me options to view details, update, as well as download the logs. I’ll click on download logs and you’ll see all of the different logs that you’re used to the access log, the error log, the request log, the logs for the dispatcher. And you’ll 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’s 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 ÃÛ¶¹ÊÓÆµ IO. So what you can do is you can just log into ÃÛ¶¹ÊÓÆµ IO. So just type in console.adobe.io in your browser bar, just like I’ve done here. And when you take a look here, you’ll see that this will give you access to the developer console. Now, first of all, just be sure you’re in the right environment. In my case, I’m using the ÃÛ¶¹ÊÓÆµ AGS 584 environment. And then choose create a new project, just like I’m doing here. So I’m creating a new project and you’ll see one of my options in this new project is to add an API. First, I’m going to just change the name of the project itself. And let’s call this cloud manager API. And I’m going to enter in the description access APIs from ÃÛ¶¹ÊÓÆµ CLI. So I’m going to create that. And then I’m going to click on that button that we looked at earlier called add API. So I’m going to click that right here. And I’m going to scroll down and I’m going to find the cloud manager APIs. I’ll click next. And then I’ll generate a key pair. This will generate both a public and a private key pair. And you’ll see that it automatically downloads that key pair directly to your downloads folder. So I’ll have that. And then go ahead and click next. And just choose the appropriate profiles. In this case, I’ll choose all of the available profiles. And that’s it. That will now create an API integration that you can use. So you’ll see here that I’m creating this and you’ll 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’ll 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 ÃÛ¶¹ÊÓÆµ CLI. And in this ÃÛ¶¹ÊÓÆµ CLI, you’ll see that the step-by-step directions for configuring the CLI are available below. And there’s 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 ÃÛ¶¹ÊÓÆµ CLI
-
Tailing Log Files
Additional Resources
Watch related videos on the Cloud 5 season 1 page.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69