-
Notifications
You must be signed in to change notification settings - Fork 496
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
Add logger level configuration support #551
Add logger level configuration support #551
Conversation
assets/runtime/functions
Outdated
echo "config.action_controller.perform_caching = true" | ||
echo "config.cache_classes = true" | ||
echo "config.cache_store = :mem_cache_store, ${MEMCACHE_HOST}:${MEMCACHE_PORT}" | ||
} >> "${REDMINE_MEMCACHED_CONFIG}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this file is pulling double duty, can we rename REDMINE_MEMCACHED_CONFIG to REDMINE_ADDITIONAL_CONFIG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
assets/runtime/functions
Outdated
fi | ||
} | ||
|
||
redmine_configure_logger() { | ||
echo "Configuring redmine::logger..." | ||
echo "config.log_level = :${LOGGER_LEVEL:-info}" >> "${REDMINE_MEMCACHED_CONFIG}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also put the LOGGER_LEVEL default in env-defaults so its consistent with the other settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ad8d4e2
to
1038183
Compare
Thanks |
echo "config.gem 'dalli'" | ||
echo "config.action_controller.perform_caching = true" | ||
echo "config.cache_classes = true" | ||
echo "config.cache_store = :mem_cache_store, ${MEMCACHE_HOST}:${MEMCACHE_PORT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a regression in this line - unquoted string in config file throws error:
bundler: failed to load command: unicorn_rails (/home/redmine/redmine/vendor/bundle/ruby/3.2.0/bin/unicorn_rails)
/home/redmine/redmine/config/application.rb:97:in `instance_eval': (eval):14: syntax error, unexpected label (SyntaxError)
... = :mem_cache_store, memcached:11211
... ^~~~~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I'll get that fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed commit to master branch, can you test and let me know before I push a new tag
Based on issue: #140
When my redmine log storage was low i was looking for log rotation solution for my redmine instance and discovered that it has one out of the box: https://github.com/search?q=repo%3Asameersbn%2Fdocker-redmine%20logrotate&type=code
It's just my instance generated so much info logs by default. So it'l be great if administrators can configure amount of generated logs but in this repo i didn't found any solution for configuring logger level so i implemented it.
Tested on my instance.
Thx for the great repo by the way! When i discovered this repo it became a lot easier to administrate redmine.