Skip to content

log4j stop working at Tomcat #127

Open
@LeighLin

Description

@LeighLin

Hi,

The log file that shopizer deployed into Tomcat has stopped working. I have found the solution. Here is the steps if someone has similar issues.

How to setup log4j logger files
Step 1. Remove sm-search-0.0.5.jar log4j.xml file
1 Find sm-search-0.0.5.jar file inside {your maven repository path}
.m2\repository\com\shopizer\sm-search\0.0.5
2 Change sm-search-0.0.5.jar to sm-search-0.0.5.zip file
3 Extract sm-search-0.0.5.zip file
4 Remove log4j.xml from sm-search-0.0.5 folder
5 use jar command to build jar file “..\sm-search-0.0.5>jar cvf sm-search-0.0.5.jar . “
6 place newly built sm-search-0.0.5.jar inside .m2\repository\com\shopizer\sm-search\0.0.5
Folder

Step 2 Rename sm-core log4j.properties file
1 go to folder ..\sm-core\src\main\resources
2 rename ..\sm-core\src\main\resources\log4j.properties to something else, as long as not log4j.properties

Step 3 Change sm-shop log4j.properties file
1 go to folder .. \sm-shop\src\main\resources\ log4j.properties
2 Modify file like the following (windows)
log4j.appender.debugLogfile.File=${catalina.home}/logs/shopizer-debug.log
3 rebuild shopizer by using maven

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions