cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

logs are not getting printed for our project

burnwal-priyanka
Explorer
0 Likes
2,319

logs are not getting printed for our project, when we rae adding below property in our local.properties

log4j.logger.com.<MYPROJECT>=INFO. When we remove this all logs are getting printed but we need to filtered logs for our project only. Any help would be much appreciated.

Thanks

Priyanka

Accepted Solutions (0)

Answers (3)

Answers (3)

samuelyang
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Priyanka,

I don't see the whole log4j configuration in the properties file but could you check it in Hac? See attached screenshot how to get there.

burnwal-priyanka
Explorer
0 Likes

Hi Samuel,

Plz find the below sceenshot.

samuelyang
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Priyanka,

It looks like something wrong with the log4j appender, could you check which appender the com.company logger is using?

You might also have a configuration conflicts somewhere in the project, which is overriding your setup. But you can quickly check it up in HAC tool and find the com.company logger in the logging tool.

Hope it helps.

burnwal-priyanka
Explorer
0 Likes

Hi Samuel,

I have below appener in the configuration-

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender

Also checked there is no such property for log4j, can you plz specify what conflict you are referring here.

kai_unewisse
Active Contributor
0 Likes

Hi,

what are the java packages that you want to log?

Your example log4j.logger.com will log all java classes that are in the com.* package. ; it will however not log java classes that start with e.g. org or de like this:

log4j.logger.org.apache.http.headers=debug
log4j.logger.de.hybris.platform.promotions=debug

So assuming that the project classes are in the com.acompany.services package then you need to define

log4j.logger.com.acompany.services=debug
burnwal-priyanka
Explorer
0 Likes

Hi Kai,

thanks for your quick reply. We have already tried adding log4j.logger.com.company=INFO, where com.company is the root package for our project, but this does not seems to work for us.