Commit graph

17 commits

Author SHA1 Message Date
gfyoung
c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Michael Kozono
a54a5d9f39 Use Gitlab::SafeRequestStore in more places
Even if it doesn’t save lines of code, since people will tend to use
code they’ve seen. And `SafeRequestStore` is safer since you
don’t have to remember to check `RequestStore.active?`.
2018-09-24 12:11:27 -07:00
Stan Hu
aaf44480c5 Backport logger changes from EE
This resolves the issues identified in https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/81699184.
2018-07-13 14:52:32 -07:00
Stan Hu
324b3bbaca Memoize GitLab logger to reduce open file descriptors
We see that in gitlab-org/gitlab-ee#3664 that if we log a lot of
data in Sidekiq workers, the number of open file descriptors
reaches over 1000. To avoid this, we can memoize the logger per
thread via RequestStore.

Closes gitlab-org/gitlab-ee#3664
2017-10-24 14:06:23 +03:00
Robert Speicher
4598e0c392 Fix a potential timeout in Gitlab::Logger.read_latest
If this method was called for a file that didn't exist, we attempted to
first `build` it. But if the file wasn't writeable, such as a symlink
pointing to an unmounted filesystem, the method would just hang and
eventually timeout.

Further, this was entirely pointless since we were creating a file and
then shelling out to `tail`, eventually returning an empty Array. Now we
just skip building it and return the empty Array straight away.
2017-08-22 17:09:45 -04:00
Ciro Santilli
9bebacd692 Dry admin logs. 2014-10-06 00:14:46 +02:00
Ciro Santilli
2e9f5de868 Add parenthesis to function def with arguments. 2014-10-03 09:18:46 +02:00
Jacob Vosmaer
2b816075dc Replace backticks with Gitlab::Popen 2014-03-03 08:40:29 +01:00
Dmitriy Zaporozhets
4b02f4a22d show production.log, show only active milestone for issue filter 2012-12-19 07:14:05 +03:00
Dmitriy Zaporozhets
ff9a2e2a93 Improve admin logs 2012-11-29 07:49:11 +03:00
Robert Speicher
afc4a75499 Use Rails.root.join where appropriate 2012-09-26 16:32:26 -04:00
randx
0523b4265b Application logger 2012-09-11 23:24:53 +03:00
Pat Thoyts
6035ad7e1f Create the githost.log file if necessary.
This resolves issue #1121.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-07-21 15:32:04 +01:00
Dmitriy Zaporozhets
8803350023 CHANGELOG updated. Fixed MR bug. Logger improved 2012-07-17 08:23:16 +03:00
Dmitriy Zaporozhets
2a705c4f40 Admin logs improved. Commits list box styled 2012-07-16 08:03:10 +03:00
Dmitriy Zaporozhets
d40b9ce26d Admin gitolite logs. Refactored project creation. Few style fixes. 2012-07-05 21:59:37 +03:00
randx
3272620f72 lib/ refactoring. Module Gitlabhq renamed to Gitlab 2012-05-26 13:37:49 +03:00
Renamed from lib/gitlabhq/logger.rb (Browse further)