Expand my Community achievements bar.

How to custom logs(manual created logs) from application

Avatar

Level 2

Hi ,

I have few loggers which have created under slinglog and under /system/console/ConfigMgr, for the consistency have moved the logs on code basis.

Now how to delete the logs from aem application which is under sling log.  I have deleted the logs from logger remover from the sling log configuration, once the application restart  still I can see the logs under  /system/console/slinglog,

Thanks,

Gavya S

>aem application

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Comments is to ask about the operation of the Forum, not a specific program]

[Moved from the Comments forum to the specific Program forum... Mod]

11 Replies

Avatar

Employee Advisor

You can click on the configuration icon for a particular logger and then click on "Remove Logger"

Screen Shot 2019-08-01 at 10.44.52 AM.png

Avatar

Employee

Hello Gavya,

Check if your custom log configs exist under /apps/system/config or /apps/yourprojectname/config and delete it from there.

Regards,

Vishu

Avatar

Employee

Hi gavyas,

Use CRXDE Lite search to search for the name of your custom log file name (e.g. file="logs/queries.log", I search for 'queries.log' ) and see if there are any results within /apps, or any other directory, which has a node name similar to below:

/apps/system/config/org.apache.sling.commons.log.LogManager.factory.config.f0515b33-4f34-4b63-9e24-ac09ff72eae0.config 

Screen Shot 2019-08-01 at 12.13.54 PM.png

Check the resulting .config file (double click the .config node within content tree to review the file -- ) and confirm if it's the custom log details -- move it to /tmp and restart AEM instance to see if the logger still shows in /system/console/slinglog

Regards,

Lisa

Avatar

Level 2

Hi Lisa,

This is not helping us this, it's deleting the code base logs from the crx/de.

Thanks,

Gavya S

Avatar

Level 6

Hi gavyas​,

Can you please explain what do you mean when you say delete the logs? I believe you have already removed the config for the logger from sling log as mentioned in the question.

Do you mean that you want to delete the old logs that were generated before you moved them to a project specific logger? If that is the case you can do say by opening the respective log file from /crx-quickstart/logs/<yourlogfile.log> and deleting them.

If not, can you post some screenshots with more details?

Avatar

Level 2

I have created a few log entries under slinglog config, for example, audit.log and search.log and so on.  Same logs have created in code base also,  now am trying to remove the manual logs created under sling log, from the remove loggers, but log configuration is deleted once the restarted application deleted logs are been under /system/console/slinglog path.  The same config is not under /apps/your project name/config (only code base logs are reflecting in the mentioned path).

Avatar

Level 6

Then you might still be having some manually created duplicate logging config for the same.

Please check if you can see multiple entries for the logger under Apache Sling Logging Logger Configuration in configMgr.

You should be able to find the duplicate entries under /apps/system/config as explained above.

The location under quickstart where these get stored is \crx-quickstart\launchpad\config\org\apache\sling\commons\log\LogManager\factory\config if you want to cross-check.

Avatar

Level 2

Yes, I can see the multiple entry under the config Apache Sling Logging Logger Configuration in ConfigMgr, attaching one of the sample ones.

1805290_pastedImage_0.png

Avatar

Level 6

Then goto /apps/system/config in CRXDE and double click on the factory config to check if it is the duplicate one. If yes, then delete it or move it to /tmp as mentioned by Lisa earlier.

Once done, come back and cross check that you have only single entry in configMgr which is from the application codebase.

No restart is needed ideally. The changes take place immediately since it is OSGi.

Avatar

Level 2

I have done that, but still, I can see the logs in system/console/slinglog. which is not the duplicated under Apache Sling Logging Logger Configuration in ConfigMgr.

Avatar

Level 2

Hi,

If you are using custom-logs using logback then please remove the respective logback xml files from the crx-quickstart.

Go to log-support  console and edit error.log and remove the logback xml entry.

Hope it will help.