Logfile using log4j2.properties

:bangbang: Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.

Hi Ambassadors,
I want to create a separate log file for debugging other than ccg.log to capture the payloads of SAP request processing. I used file appender in log4j2.properties and sudo systemctl stop/start ccg. But still the new log file is not created in the /log folder.
How do I redirect SAP processing logs to just a file?.
Thanks

Can you show your log4j.properties?

put this in you log4j2 for separated logger

appender.WhatteverYouWant.type=RollingFile
appender.WhatteverYouWant.name=WhatteverYouWant
appender.WhatteverYouWant.fileName=/opt/tomcat/logs/sailpoint-app0.log
appender.WhatteverYouWant.filePattern=/opt/tomcat/logs/sailpoint-app0-%d{yyyy-MM-dd-hh}-%i.log.gz
appender.WhatteverYouWant.layout.type=PatternLayout
appender.WhatteverYouWant.layout.pattern=%d{ISO8601} %5p %t %c{4}:%L - %m%n

logger.app0.name= "NAME CLASS"
logger.app0.level=trace
logger.app0.appenderRef.Confile.ref=WhatteverYouWant
logger.app0.additivity=false

Of course change file locations and else

Thank you Ivan and Kamil. I’ll try it and let you know how it went.

I tried this hoping to see sailpoint.log. but it didn’t work.

Rotate log file

appender.LogToRollingFile.type = RollingFile
appender.LogToRollingFile.name = LogToRollingFile
appender.LogToRollingFile.fileName = sailpoint.log
appender.LogToRollingFile.filePattern = $${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz
appender.LogToRollingFile.layout.type = PatternLayout
appender.LogToRollingFile.layout.pattern = %d %p %C{1.} [%t] %m%n
appender.LogToRollingFile.policies.size.size=10MB
appender.LogToRollingFile.strategy.type = DefaultRolloverStrategy

logger.app0.name= sailpoint.connector.WebServices
logger.app0.level=trace
logger.app0.appenderRef.Confile.ref=LogToRollingFile
logger.app0.additivity=false

2nd one.
there is log.info"Contents" in the connector before operation rule. where does this log info go, to which file?. I searched in /home/sailpoint/log folder. I don’t see those details.

You need to inform the folder for example “/home/sailpoint/log/sailpoint.log”

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.