[MGNLBACKUP-134] Add log4j2 configuration parameter to backup script Created: 27/May/20 Updated: 29/Mar/22 Resolved: 15/Mar/21 |
|
| Status: | Closed |
| Project: | Backup |
| Component/s: | None |
| Affects Version/s: | 2.4 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Unassigned |
| Resolution: | Workaround exists | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Date of First Response: | |||||
| Team: | |||||
| Description |
|
When using the backup/restore script, it would be good to provide users with a parameter to configure log4j2 through a configuration file so that they can configure the log output according to their needs. Additionally, with this parameter, users wouldn't see the error message, which is shown just at the beginning of the execution: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging. |
| Comments |
| Comment by Jonathan Ayala [ 27/May/20 ] |
|
A workaround would be adding the parameter in the backup.sh script: backup.sh(from line 120) exec "$JAVACMD" $JAVA_OPTS -Xmx1024M \ -classpath "$CLASSPATH" \ -Dapp.name="backup" \ -Dapp.pid="$$" \ -Dapp.repo="$REPO" \ -Dapp.home="$BASEDIR" \ -Dbasedir="$BASEDIR" \ -Dlog4j.configurationFile="file:/Users/.../log4j2.xml" \ <-Add this line info.magnolia.module.backup.launcher.BackupLauncher \ "$@" |