Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fits service log written to incorrect location #460

Closed
dannylamb opened this issue Dec 14, 2016 · 5 comments · Fixed by islandora-deprecated/ansible-role-fits#8
Closed
Assignees

Comments

@dannylamb
Copy link
Contributor

By default, the fits-service is expecting its log to be in /usr/share/tomcat7/logs, but our logs are actually in /var/log/tomcat7 as per our apt-get install.

We need to find out how we can tell the fits service to try and set up logging in /var/log/tomcat7.

@acoburn
Copy link
Contributor

acoburn commented Dec 14, 2016

Here's what I do -- put this in the log4j.properties file:

## FITS Logging
log4j.appender.fits=org.apache.log4j.RollingFileAppender
log4j.appender.fits.File=${catalina.home}/logs/fits-service.log
log4j.appender.fits.Threshold=INFO
log4j.appender.fits.Append=true
log4j.appender.fits.MaxFileSize=5MB
log4j.appender.fits.MaxBackupIndex=10
log4j.appender.fits.layout=org.apache.log4j.PatternLayout
log4j.appender.fits.layout.ConversionPattern=%d${date-pattern} - %5p - %c{1}:%L - %m%n

log4j.logger.uk.gov.nationalarchives=INFO, fits
log4j.logger.edu.harvard.hul.ois=INFO, fits
log4j.logger.org.apache.tika=INFO, fits
log4j.additivity.org.apache.tika=false
log4j.additivity.uk.gov.nationalarchives=false
log4j.additivity.edu.harvard.hul.ois=false

You can set the location of that log4j.properties file like so: JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=/etc/tomcat/log4j.properties" (unless you have something else that overrides that location, such as fuseki, in which case you can just add the above to $FUSEKI_HOME/log4j.properties)

@ruebot ruebot self-assigned this Feb 16, 2017
@ruebot
Copy link
Member

ruebot commented Feb 16, 2017

Spinning up an environment to see if this is still an issue.

@ruebot
Copy link
Member

ruebot commented Feb 16, 2017

@acoburn JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=/etc/tomcat/log4j.properties" does that override all Tomcat application log4j.properties files? Or, I guess said another way, If I only put FITS log4j.properties information in that file, will it continue using what Fedora and Blazegraph have defined, or will I need to include that in the file as well?

@ruebot
Copy link
Member

ruebot commented Jun 28, 2019

Close? claw-vagrant is deprecated.

@ruebot
Copy link
Member

ruebot commented Nov 4, 2020

This is still an issue on the Playbook:

root@islandora8:/var/log/tomcat8# grep fits-service.log catalina.out 
java.io.FileNotFoundException: /usr/share/tomcat8/logs/fits-service.log (No such file or directory)

I'll put in a PR on https://github.com/Islandora-Devops/ansible-role-fits

@ruebot ruebot reopened this Nov 4, 2020
ruebot added a commit to yorkulibraries/ansible-role-fits that referenced this issue Nov 4, 2020
- Add log4j.properties.j2
- Add task to move template into place
- Set default variable
- Fix comment
- Resolves Islandora/documentation#460
- Resolves yorkulibraries/yudl-playbook#13
ruebot added a commit to yorkulibraries/ansible-role-fits that referenced this issue Nov 4, 2020
- Add log4j.properties.j2
- Add task to move template into place
- Set default variable
- Fix comment
- Resolves Islandora/documentation#460
- Resolves yorkulibraries/yudl-playbook#13
ruebot added a commit to yorkulibraries/ansible-role-fits that referenced this issue Nov 4, 2020
- Add log4j.properties.j2
- Add task to move template into place
- Set default variable
- Fix comment
- Resolves Islandora/documentation#460
- Resolves yorkulibraries/yudl-playbook#13
ruebot added a commit to yorkulibraries/ansible-role-fits that referenced this issue Nov 4, 2020
- Add log4j.properties.j2
- Add task to move template into place
- Set default variable
- Fix comment
- Resolves Islandora/documentation#460
- Resolves yorkulibraries/yudl-playbook#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants