1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Mike Perham
55ced28181
Update standard rules (#5360)
* update standard rules and run standard:fix

* Fix more standard errors

* standardize
2022-06-05 07:44:52 -07:00
Sam
0724848bf1
Update last of spec files to use it and describe, instead od minitest (#5357) 2022-06-02 10:31:42 -07:00
ojab
20cdf68a73
Improve compatibility with Semantic Logger (#5238)
Semantic Logger returns Symbol for `#level`:
```
[1] pry(main)> SemanticLogger[Sidekiq].level
=> :debug
```
so current code fails with
```
[2] pry(main)> Sidekiq.logger = SemanticLogger[Sidekiq]
=> #<SemanticLogger::Logger:0x00007f1d27984a18 @filter=nil, @level=nil, @level_index=nil, @name="Sidekiq">
[3] pry(main)> Sidekiq.logger.debug?
ArgumentError: comparison of Symbol with 0 failed
from /home/ojab/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/sidekiq-6.4.1/lib/sidekiq/logger.rb:39:in
`<='
```
Calling `#{level}?` methods on the logger directly instead of
comparing `#level` with integer fixes that.
2022-03-10 09:20:18 -08:00
Mike Perham
5776c7ae87 standard:fix the testsuite codebase, no functional changes 2022-03-03 12:51:10 -08:00
Martyn
84d638294d Remove unused test helper. (#4317) 2019-10-07 21:46:34 -07:00
Mike Perham
fd634c05fd rename method 2019-09-25 15:53:04 -07:00
Mike Perham
c8fb57b2c0 Simplify threadsafe logging 2019-09-25 15:52:48 -07:00
fatkodima
7f68ba8838 Support job-specific log levels 2019-09-25 15:34:47 -07:00
fatkodima
c428383523 Support job tags 2019-09-23 13:00:59 -07:00
Mike Perham
022c63d86f Rework logger changes a bit
* logger_formatter -> log_format
* avoid touching global Sidekiq.logger in JobLogger
* rewrite tests for compactness and coverage
* hide banner in JSON
2018-12-29 07:54:05 -08:00
Andrew Babichev
3845832c20 JSON Logger Formatter (#4050)
* Check Config File Existence (#4054)

* Check config file existence

* Eager config file check

* Parse expanded path to default sidekiq.yml config file in Rails app

* Cleanup

* Add minitest-around

* Extract context from formatter

* Add JSON logger formatter

* Adjust job logger to handle elapsed time within context

* Add tid test

* Rename processor logger

* Enforce global state reset in logging tests

* Add warning about upcoming refactoring to Sidekiq::Logging

* Replace around hook with explicit stub inside test

It's implemented with fibers, which means Thread.current returns different values in JRuby.

* Fix typo

* Concise JSON formatter keys

* Add logger_formatter option

* Shift context from array of strings to hash

Allows more flexibly format context in the different formatters.

* Adjust warning message regarding context type change

* Add "Formatter" suffix to classes

* Fix CLI specs

* Replace Sidekiq::Logging with Sidekiq::Logger

* Namespace logger formatters

* Remove rails 4 appraisal
2018-12-28 15:05:51 -08:00