checkoff 0.222.0 → 0.225.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/attachments.rb +1 -0
  4. data/lib/checkoff/cli.rb +1 -1
  5. data/lib/checkoff/clients.rb +2 -1
  6. data/lib/checkoff/custom_fields.rb +2 -1
  7. data/lib/checkoff/events.rb +2 -1
  8. data/lib/checkoff/internal/asana_event_enrichment.rb +1 -0
  9. data/lib/checkoff/internal/asana_event_filter.rb +1 -0
  10. data/lib/checkoff/internal/config_loader.rb +2 -2
  11. data/lib/checkoff/internal/logging.rb +6 -5
  12. data/lib/checkoff/internal/project_hashes.rb +1 -0
  13. data/lib/checkoff/internal/project_selector_evaluator.rb +2 -1
  14. data/lib/checkoff/internal/project_timing.rb +1 -0
  15. data/lib/checkoff/internal/search_url/custom_field_param_converter.rb +1 -0
  16. data/lib/checkoff/internal/search_url/custom_field_variant.rb +1 -0
  17. data/lib/checkoff/internal/search_url/date_param_converter.rb +1 -0
  18. data/lib/checkoff/internal/search_url/parser.rb +1 -0
  19. data/lib/checkoff/internal/search_url/results_merger.rb +1 -0
  20. data/lib/checkoff/internal/search_url/simple_param_converter.rb +1 -0
  21. data/lib/checkoff/internal/search_url.rb +1 -0
  22. data/lib/checkoff/internal/section_selector_evaluator.rb +2 -1
  23. data/lib/checkoff/internal/selector_classes/common/function_evaluator.rb +1 -0
  24. data/lib/checkoff/internal/selector_classes/common.rb +1 -0
  25. data/lib/checkoff/internal/selector_classes/function_evaluator.rb +1 -0
  26. data/lib/checkoff/internal/selector_classes/project/function_evaluator.rb +1 -0
  27. data/lib/checkoff/internal/selector_classes/project.rb +1 -0
  28. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -1
  29. data/lib/checkoff/internal/selector_classes/section.rb +1 -0
  30. data/lib/checkoff/internal/selector_classes/task/function_evaluator.rb +1 -0
  31. data/lib/checkoff/internal/selector_classes/task.rb +1 -0
  32. data/lib/checkoff/internal/selector_evaluator.rb +5 -4
  33. data/lib/checkoff/internal/task_hashes.rb +1 -0
  34. data/lib/checkoff/internal/task_selector_evaluator.rb +2 -1
  35. data/lib/checkoff/internal/task_timing.rb +1 -0
  36. data/lib/checkoff/internal/thread_local.rb +1 -0
  37. data/lib/checkoff/monkeypatches/resource_marshalling.rb +1 -0
  38. data/lib/checkoff/my_tasks.rb +2 -1
  39. data/lib/checkoff/portfolios.rb +12 -9
  40. data/lib/checkoff/project_selectors.rb +1 -0
  41. data/lib/checkoff/projects.rb +3 -1
  42. data/lib/checkoff/resources.rb +1 -0
  43. data/lib/checkoff/section_selectors.rb +1 -0
  44. data/lib/checkoff/sections.rb +4 -4
  45. data/lib/checkoff/subtasks.rb +1 -0
  46. data/lib/checkoff/tags.rb +67 -17
  47. data/lib/checkoff/task_searches.rb +1 -0
  48. data/lib/checkoff/task_selectors.rb +1 -0
  49. data/lib/checkoff/tasks.rb +2 -2
  50. data/lib/checkoff/timelines.rb +1 -0
  51. data/lib/checkoff/timing.rb +1 -0
  52. data/lib/checkoff/version.rb +2 -1
  53. data/lib/checkoff/workspaces.rb +2 -1
  54. data/lib/checkoff.rb +1 -0
  55. data/rbi/checkoff.rbi +4529 -0
  56. data/sig/checkoff.rbs +3749 -0
  57. metadata +4 -205
  58. data/.circleci/config.yml +0 -291
  59. data/.envrc +0 -9
  60. data/.git-hooks/pre_commit/circle_ci.rb +0 -25
  61. data/.git-hooks/pre_commit/punchlist.rb +0 -51
  62. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -76
  63. data/.gitattributes +0 -6
  64. data/.gitignore +0 -61
  65. data/.markdownlint_style.rb +0 -3
  66. data/.mdlrc +0 -1
  67. data/.overcommit.yml +0 -114
  68. data/.rubocop.yml +0 -143
  69. data/.rubocop_todo.yml +0 -90
  70. data/.solargraph.yml +0 -35
  71. data/.yamllint.yml +0 -8
  72. data/CODE_OF_CONDUCT.md +0 -133
  73. data/CONTRIBUTING.rst +0 -75
  74. data/DEVELOPMENT.md +0 -69
  75. data/GLOSSARY.md +0 -16
  76. data/Gemfile +0 -66
  77. data/Gemfile.lock +0 -336
  78. data/LICENSE +0 -21
  79. data/Makefile +0 -121
  80. data/bin/brakeman +0 -27
  81. data/bin/bump +0 -29
  82. data/bin/checkoff +0 -29
  83. data/bin/console +0 -15
  84. data/bin/overcommit +0 -29
  85. data/bin/overcommit_branch +0 -114
  86. data/bin/rake +0 -29
  87. data/bin/rubocop +0 -27
  88. data/bin/setup +0 -8
  89. data/bin/solargraph +0 -27
  90. data/bin/sord +0 -27
  91. data/bin/spoom +0 -27
  92. data/bin/srb +0 -27
  93. data/bin/srb-rbi +0 -27
  94. data/bin/tapioca +0 -27
  95. data/bin/yard +0 -27
  96. data/config/annotations_asana.rb +0 -254
  97. data/config/annotations_misc.rb +0 -68
  98. data/config/env.1p +0 -2
  99. data/docs/.gitignore +0 -3
  100. data/docs/cookiecutter_input.json +0 -17
  101. data/docs/example_project.png +0 -0
  102. data/fix.sh +0 -534
  103. data/metrics/bigfiles_high_water_mark +0 -1
  104. data/metrics/brakeman_high_water_mark +0 -1
  105. data/metrics/bundle-audit_high_water_mark +0 -1
  106. data/metrics/cane_high_water_mark +0 -1
  107. data/metrics/eslint_high_water_mark +0 -1
  108. data/metrics/flake8_high_water_mark +0 -1
  109. data/metrics/flay_high_water_mark +0 -1
  110. data/metrics/flog_high_water_mark +0 -1
  111. data/metrics/jscs_high_water_mark +0 -1
  112. data/metrics/mdl_high_water_mark +0 -1
  113. data/metrics/pep8_high_water_mark +0 -1
  114. data/metrics/punchlist_high_water_mark +0 -1
  115. data/metrics/pycodestyle_high_water_mark +0 -1
  116. data/metrics/rails_best_practices_high_water_mark +0 -1
  117. data/metrics/rubocop_high_water_mark +0 -1
  118. data/metrics/scalastyle_high_water_mark +0 -1
  119. data/metrics/shellcheck_high_water_mark +0 -1
  120. data/package.json +0 -9
  121. data/rakelib/citest.rake +0 -4
  122. data/rakelib/clear_metrics.rake +0 -9
  123. data/rakelib/console.rake +0 -15
  124. data/rakelib/default.rake +0 -4
  125. data/rakelib/doc.rake +0 -6
  126. data/rakelib/gem_tasks.rake +0 -3
  127. data/rakelib/localtest.rake +0 -4
  128. data/rakelib/overcommit.rake +0 -6
  129. data/rakelib/quality.rake +0 -4
  130. data/rakelib/repl.rake +0 -4
  131. data/rakelib/test.rake +0 -10
  132. data/rakelib/trigger_next_builds.rake +0 -7
  133. data/rakelib/undercover.rake +0 -8
  134. data/requirements_dev.txt +0 -2
  135. data/sorbet/config +0 -4
  136. data/sorbet/rbi/annotations/.gitattributes +0 -1
  137. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  138. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  139. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  140. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  141. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  142. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  143. data/sorbet/rbi/dsl/.gitattributes +0 -1
  144. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  145. data/sorbet/rbi/gems/.gitattributes +0 -1
  146. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  147. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  148. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  149. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  150. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  151. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  152. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  153. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  154. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  155. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  156. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  157. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  158. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  159. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  160. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  161. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  162. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  163. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  164. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  165. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  166. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  167. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  168. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  169. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  170. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  171. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  172. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  173. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  174. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  175. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  176. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  177. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  178. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  179. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  180. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  181. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  182. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  183. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  184. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  185. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  186. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  187. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  188. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  189. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  190. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  191. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  192. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  193. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  194. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  195. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  196. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  197. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  198. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  199. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  200. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  201. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  202. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  203. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  204. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  205. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  206. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  207. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  208. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  209. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  210. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  211. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  212. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  213. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  214. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  215. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  216. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  217. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  218. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  219. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  220. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  221. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  222. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  223. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  224. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  225. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  226. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  227. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  228. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  229. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  230. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7061
  231. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  232. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  233. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  234. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  235. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  236. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  237. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  238. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  239. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  240. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  241. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  242. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  243. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  244. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  245. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  246. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  247. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  248. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  249. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  250. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  251. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  252. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  253. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  254. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  255. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  256. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  257. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  258. data/sorbet/rbi/todo.rbi +0 -11
  259. data/sorbet/tapioca/config.yml +0 -13
  260. data/sorbet/tapioca/require.rb +0 -4
@@ -1,923 +0,0 @@
1
- # typed: false
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `logger` gem.
5
- # Please instead update this file by running `bin/tapioca gem logger`.
6
-
7
-
8
- # \Class \Logger provides a simple but sophisticated logging utility that
9
- # you can use to create one or more
10
- # {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs]
11
- # for your program.
12
- # Each such log contains a chronological sequence of entries
13
- # that provides a record of the program's activities.
14
- #
15
- # == About the Examples
16
- #
17
- # All examples on this page assume that \Logger has been required:
18
- #
19
- # require 'logger'
20
- #
21
- # == Synopsis
22
- #
23
- # Create a log with Logger.new:
24
- #
25
- # # Single log file.
26
- # logger = Logger.new('t.log')
27
- # # Size-based rotated logging: 3 10-megabyte files.
28
- # logger = Logger.new('t.log', 3, 10485760)
29
- # # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly').
30
- # logger = Logger.new('t.log', 'daily')
31
- # # Log to an IO stream.
32
- # logger = Logger.new($stdout)
33
- #
34
- # Add entries (level, message) with Logger#add:
35
- #
36
- # logger.add(Logger::DEBUG, 'Maximal debugging info')
37
- # logger.add(Logger::INFO, 'Non-error information')
38
- # logger.add(Logger::WARN, 'Non-error warning')
39
- # logger.add(Logger::ERROR, 'Non-fatal error')
40
- # logger.add(Logger::FATAL, 'Fatal error')
41
- # logger.add(Logger::UNKNOWN, 'Most severe')
42
- #
43
- # Close the log with Logger#close:
44
- #
45
- # logger.close
46
- #
47
- # == Entries
48
- #
49
- # You can add entries with method Logger#add:
50
- #
51
- # logger.add(Logger::DEBUG, 'Maximal debugging info')
52
- # logger.add(Logger::INFO, 'Non-error information')
53
- # logger.add(Logger::WARN, 'Non-error warning')
54
- # logger.add(Logger::ERROR, 'Non-fatal error')
55
- # logger.add(Logger::FATAL, 'Fatal error')
56
- # logger.add(Logger::UNKNOWN, 'Most severe')
57
- #
58
- # These shorthand methods also add entries:
59
- #
60
- # logger.debug('Maximal debugging info')
61
- # logger.info('Non-error information')
62
- # logger.warn('Non-error warning')
63
- # logger.error('Non-fatal error')
64
- # logger.fatal('Fatal error')
65
- # logger.unknown('Most severe')
66
- #
67
- # When you call any of these methods,
68
- # the entry may or may not be written to the log,
69
- # depending on the entry's severity and on the log level;
70
- # see {Log Level}[rdoc-ref:Logger@Log+Level]
71
- #
72
- # An entry always has:
73
- #
74
- # - A severity (the required argument to #add).
75
- # - An automatically created timestamp.
76
- #
77
- # And may also have:
78
- #
79
- # - A message.
80
- # - A program name.
81
- #
82
- # Example:
83
- #
84
- # logger = Logger.new($stdout)
85
- # logger.add(Logger::INFO, 'My message.', 'mung')
86
- # # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message.
87
- #
88
- # The default format for an entry is:
89
- #
90
- # "%s, [%s #%d] %5s -- %s: %s\n"
91
- #
92
- # where the values to be formatted are:
93
- #
94
- # - \Severity (one letter).
95
- # - Timestamp.
96
- # - Process id.
97
- # - \Severity (word).
98
- # - Program name.
99
- # - Message.
100
- #
101
- # You can use a different entry format by:
102
- #
103
- # - Setting a custom format proc (affects following entries);
104
- # see {formatter=}[Logger.html#attribute-i-formatter].
105
- # - Calling any of the methods above with a block
106
- # (affects only the one entry).
107
- # Doing so can have two benefits:
108
- #
109
- # - Context: the block can evaluate the entire program context
110
- # and create a context-dependent message.
111
- # - Performance: the block is not evaluated unless the log level
112
- # permits the entry actually to be written:
113
- #
114
- # logger.error { my_slow_message_generator }
115
- #
116
- # Contrast this with the string form, where the string is
117
- # always evaluated, regardless of the log level:
118
- #
119
- # logger.error("#{my_slow_message_generator}")
120
- #
121
- # === \Severity
122
- #
123
- # The severity of a log entry has two effects:
124
- #
125
- # - Determines whether the entry is selected for inclusion in the log;
126
- # see {Log Level}[rdoc-ref:Logger@Log+Level].
127
- # - Indicates to any log reader (whether a person or a program)
128
- # the relative importance of the entry.
129
- #
130
- # === Timestamp
131
- #
132
- # The timestamp for a log entry is generated automatically
133
- # when the entry is created.
134
- #
135
- # The logged timestamp is formatted by method
136
- # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]
137
- # using this format string:
138
- #
139
- # '%Y-%m-%dT%H:%M:%S.%6N'
140
- #
141
- # Example:
142
- #
143
- # logger = Logger.new($stdout)
144
- # logger.add(Logger::INFO)
145
- # # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil
146
- #
147
- # You can set a different format using method #datetime_format=.
148
- #
149
- # === Message
150
- #
151
- # The message is an optional argument to an entry method:
152
- #
153
- # logger = Logger.new($stdout)
154
- # logger.add(Logger::INFO, 'My message')
155
- # # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message
156
- #
157
- # For the default entry formatter, <tt>Logger::Formatter</tt>,
158
- # the message object may be:
159
- #
160
- # - A string: used as-is.
161
- # - An Exception: <tt>message.message</tt> is used.
162
- # - Anything else: <tt>message.inspect</tt> is used.
163
- #
164
- # *Note*: Logger::Formatter does not escape or sanitize
165
- # the message passed to it.
166
- # Developers should be aware that malicious data (user input)
167
- # may be in the message, and should explicitly escape untrusted data.
168
- #
169
- # You can use a custom formatter to escape message data;
170
- # see the example at {formatter=}[Logger.html#attribute-i-formatter].
171
- #
172
- # === Program Name
173
- #
174
- # The program name is an optional argument to an entry method:
175
- #
176
- # logger = Logger.new($stdout)
177
- # logger.add(Logger::INFO, 'My message', 'mung')
178
- # # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message
179
- #
180
- # The default program name for a new logger may be set in the call to
181
- # Logger.new via optional keyword argument +progname+:
182
- #
183
- # logger = Logger.new('t.log', progname: 'mung')
184
- #
185
- # The default program name for an existing logger may be set
186
- # by a call to method #progname=:
187
- #
188
- # logger.progname = 'mung'
189
- #
190
- # The current program name may be retrieved with method
191
- # {progname}[Logger.html#attribute-i-progname]:
192
- #
193
- # logger.progname # => "mung"
194
- #
195
- # == Log Level
196
- #
197
- # The log level setting determines whether an entry is actually
198
- # written to the log, based on the entry's severity.
199
- #
200
- # These are the defined severities (least severe to most severe):
201
- #
202
- # logger = Logger.new($stdout)
203
- # logger.add(Logger::DEBUG, 'Maximal debugging info')
204
- # # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info
205
- # logger.add(Logger::INFO, 'Non-error information')
206
- # # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information
207
- # logger.add(Logger::WARN, 'Non-error warning')
208
- # # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning
209
- # logger.add(Logger::ERROR, 'Non-fatal error')
210
- # # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error
211
- # logger.add(Logger::FATAL, 'Fatal error')
212
- # # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error
213
- # logger.add(Logger::UNKNOWN, 'Most severe')
214
- # # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe
215
- #
216
- # The default initial level setting is Logger::DEBUG, the lowest level,
217
- # which means that all entries are to be written, regardless of severity:
218
- #
219
- # logger = Logger.new($stdout)
220
- # logger.level # => 0
221
- # logger.add(0, "My message")
222
- # # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message
223
- #
224
- # You can specify a different setting in a new logger
225
- # using keyword argument +level+ with an appropriate value:
226
- #
227
- # logger = Logger.new($stdout, level: Logger::ERROR)
228
- # logger = Logger.new($stdout, level: 'error')
229
- # logger = Logger.new($stdout, level: :error)
230
- # logger.level # => 3
231
- #
232
- # With this level, entries with severity Logger::ERROR and higher
233
- # are written, while those with lower severities are not written:
234
- #
235
- # logger = Logger.new($stdout, level: Logger::ERROR)
236
- # logger.add(3)
237
- # # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil
238
- # logger.add(2) # Silent.
239
- #
240
- # You can set the log level for an existing logger
241
- # with method #level=:
242
- #
243
- # logger.level = Logger::ERROR
244
- #
245
- # These shorthand methods also set the level:
246
- #
247
- # logger.debug! # => 0
248
- # logger.info! # => 1
249
- # logger.warn! # => 2
250
- # logger.error! # => 3
251
- # logger.fatal! # => 4
252
- #
253
- # You can retrieve the log level with method #level.
254
- #
255
- # logger.level = Logger::ERROR
256
- # logger.level # => 3
257
- #
258
- # These methods return whether a given
259
- # level is to be written:
260
- #
261
- # logger.level = Logger::ERROR
262
- # logger.debug? # => false
263
- # logger.info? # => false
264
- # logger.warn? # => false
265
- # logger.error? # => true
266
- # logger.fatal? # => true
267
- #
268
- # == Log File Rotation
269
- #
270
- # By default, a log file is a single file that grows indefinitely
271
- # (until explicitly closed); there is no file rotation.
272
- #
273
- # To keep log files to a manageable size,
274
- # you can use _log_ _file_ _rotation_, which uses multiple log files:
275
- #
276
- # - Each log file has entries for a non-overlapping
277
- # time interval.
278
- # - Only the most recent log file is open and active;
279
- # the others are closed and inactive.
280
- #
281
- # === Size-Based Rotation
282
- #
283
- # For size-based log file rotation, call Logger.new with:
284
- #
285
- # - Argument +logdev+ as a file path.
286
- # - Argument +shift_age+ with a positive integer:
287
- # the number of log files to be in the rotation.
288
- # - Argument +shift_size+ as a positive integer:
289
- # the maximum size (in bytes) of each log file;
290
- # defaults to 1048576 (1 megabyte).
291
- #
292
- # Examples:
293
- #
294
- # logger = Logger.new('t.log', 3) # Three 1-megabyte files.
295
- # logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files.
296
- #
297
- # For these examples, suppose:
298
- #
299
- # logger = Logger.new('t.log', 3)
300
- #
301
- # Logging begins in the new log file, +t.log+;
302
- # the log file is "full" and ready for rotation
303
- # when a new entry would cause its size to exceed +shift_size+.
304
- #
305
- # The first time +t.log+ is full:
306
- #
307
- # - +t.log+ is closed and renamed to +t.log.0+.
308
- # - A new file +t.log+ is opened.
309
- #
310
- # The second time +t.log+ is full:
311
- #
312
- # - +t.log.0 is renamed as +t.log.1+.
313
- # - +t.log+ is closed and renamed to +t.log.0+.
314
- # - A new file +t.log+ is opened.
315
- #
316
- # Each subsequent time that +t.log+ is full,
317
- # the log files are rotated:
318
- #
319
- # - +t.log.1+ is removed.
320
- # - +t.log.0 is renamed as +t.log.1+.
321
- # - +t.log+ is closed and renamed to +t.log.0+.
322
- # - A new file +t.log+ is opened.
323
- #
324
- # === Periodic Rotation
325
- #
326
- # For periodic rotation, call Logger.new with:
327
- #
328
- # - Argument +logdev+ as a file path.
329
- # - Argument +shift_age+ as a string period indicator.
330
- #
331
- # Examples:
332
- #
333
- # logger = Logger.new('t.log', 'daily') # Rotate log files daily.
334
- # logger = Logger.new('t.log', 'weekly') # Rotate log files weekly.
335
- # logger = Logger.new('t.log', 'monthly') # Rotate log files monthly.
336
- #
337
- # Example:
338
- #
339
- # logger = Logger.new('t.log', 'daily')
340
- #
341
- # When the given period expires:
342
- #
343
- # - The base log file, +t.log+ is closed and renamed
344
- # with a date-based suffix such as +t.log.20220509+.
345
- # - A new log file +t.log+ is opened.
346
- # - Nothing is removed.
347
- #
348
- # The default format for the suffix is <tt>'%Y%m%d'</tt>,
349
- # which produces a suffix similar to the one above.
350
- # You can set a different format using create-time option
351
- # +shift_period_suffix+;
352
- # see details and suggestions at
353
- # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
354
- #
355
- # source://logger//lib/logger/version.rb#3
356
- class Logger
357
- include ::Logger::Severity
358
-
359
- # :call-seq:
360
- # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options)
361
- #
362
- # With the single argument +logdev+,
363
- # returns a new logger with all default options:
364
- #
365
- # Logger.new('t.log') # => #<Logger:0x000001e685dc6ac8>
366
- #
367
- # Argument +logdev+ must be one of:
368
- #
369
- # - A string filepath: entries are to be written
370
- # to the file at that path; if the file at that path exists,
371
- # new entries are appended.
372
- # - An IO stream (typically +$stdout+, +$stderr+. or an open file):
373
- # entries are to be written to the given stream.
374
- # - +nil+ or +File::NULL+: no entries are to be written.
375
- #
376
- # Examples:
377
- #
378
- # Logger.new('t.log')
379
- # Logger.new($stdout)
380
- #
381
- # The keyword options are:
382
- #
383
- # - +level+: sets the log level; default value is Logger::DEBUG.
384
- # See {Log Level}[rdoc-ref:Logger@Log+Level]:
385
- #
386
- # Logger.new('t.log', level: Logger::ERROR)
387
- #
388
- # - +progname+: sets the default program name; default is +nil+.
389
- # See {Program Name}[rdoc-ref:Logger@Program+Name]:
390
- #
391
- # Logger.new('t.log', progname: 'mung')
392
- #
393
- # - +formatter+: sets the entry formatter; default is +nil+.
394
- # See {formatter=}[Logger.html#attribute-i-formatter].
395
- # - +datetime_format+: sets the format for entry timestamp;
396
- # default is +nil+.
397
- # See #datetime_format=.
398
- # - +binmode+: sets whether the logger writes in binary mode;
399
- # default is +false+.
400
- # - +shift_period_suffix+: sets the format for the filename suffix
401
- # for periodic log file rotation; default is <tt>'%Y%m%d'</tt>.
402
- # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
403
- # - +reraise_write_errors+: An array of exception classes, which will
404
- # be reraised if there is an error when writing to the log device.
405
- # The default is to swallow all exceptions raised.
406
- #
407
- # @return [Logger] a new instance of Logger
408
- #
409
- # source://logger//lib/logger.rb#581
410
- def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end
411
-
412
- # Writes the given +msg+ to the log with no formatting;
413
- # returns the number of characters written,
414
- # or +nil+ if no log device exists:
415
- #
416
- # logger = Logger.new($stdout)
417
- # logger << 'My message.' # => 10
418
- #
419
- # Output:
420
- #
421
- # My message.
422
- #
423
- # source://logger//lib/logger.rb#689
424
- def <<(msg); end
425
-
426
- # Creates a log entry, which may or may not be written to the log,
427
- # depending on the entry's severity and on the log level.
428
- # See {Log Level}[rdoc-ref:Logger@Log+Level]
429
- # and {Entries}[rdoc-ref:Logger@Entries] for details.
430
- #
431
- # Examples:
432
- #
433
- # logger = Logger.new($stdout, progname: 'mung')
434
- # logger.add(Logger::INFO)
435
- # logger.add(Logger::ERROR, 'No good')
436
- # logger.add(Logger::ERROR, 'No good', 'gnum')
437
- #
438
- # Output:
439
- #
440
- # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
441
- # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
442
- # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
443
- #
444
- # These convenience methods have implicit severity:
445
- #
446
- # - #debug.
447
- # - #info.
448
- # - #warn.
449
- # - #error.
450
- # - #fatal.
451
- # - #unknown.
452
- #
453
- # source://logger//lib/logger.rb#656
454
- def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
455
-
456
- # Closes the logger; returns +nil+:
457
- #
458
- # logger = Logger.new('t.log')
459
- # logger.close # => nil
460
- # logger.info('foo') # Prints "log writing failed. closed stream"
461
- #
462
- # Related: Logger#reopen.
463
- #
464
- # source://logger//lib/logger.rb#736
465
- def close; end
466
-
467
- # Returns the date-time format; see #datetime_format=.
468
- #
469
- # source://logger//lib/logger.rb#438
470
- def datetime_format; end
471
-
472
- # Sets the date-time format.
473
- #
474
- # Argument +datetime_format+ should be either of these:
475
- #
476
- # - A string suitable for use as a format for method
477
- # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
478
- # - +nil+: the logger uses <tt>'%Y-%m-%dT%H:%M:%S.%6N'</tt>.
479
- #
480
- # source://logger//lib/logger.rb#432
481
- def datetime_format=(datetime_format); end
482
-
483
- # Equivalent to calling #add with severity <tt>Logger::DEBUG</tt>.
484
- #
485
- # source://logger//lib/logger.rb#695
486
- def debug(progname = T.unsafe(nil), &block); end
487
-
488
- # Sets the log level to Logger::DEBUG.
489
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
490
- #
491
- # source://logger//lib/logger.rb#487
492
- def debug!; end
493
-
494
- # Returns +true+ if the log level allows entries with severity
495
- # Logger::DEBUG to be written, +false+ otherwise.
496
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
497
- #
498
- # @return [Boolean]
499
- #
500
- # source://logger//lib/logger.rb#482
501
- def debug?; end
502
-
503
- # Equivalent to calling #add with severity <tt>Logger::ERROR</tt>.
504
- #
505
- # source://logger//lib/logger.rb#713
506
- def error(progname = T.unsafe(nil), &block); end
507
-
508
- # Sets the log level to Logger::ERROR.
509
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
510
- #
511
- # source://logger//lib/logger.rb#520
512
- def error!; end
513
-
514
- # Returns +true+ if the log level allows entries with severity
515
- # Logger::ERROR to be written, +false+ otherwise.
516
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
517
- #
518
- # @return [Boolean]
519
- #
520
- # source://logger//lib/logger.rb#515
521
- def error?; end
522
-
523
- # Equivalent to calling #add with severity <tt>Logger::FATAL</tt>.
524
- #
525
- # source://logger//lib/logger.rb#719
526
- def fatal(progname = T.unsafe(nil), &block); end
527
-
528
- # Sets the log level to Logger::FATAL.
529
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
530
- #
531
- # source://logger//lib/logger.rb#531
532
- def fatal!; end
533
-
534
- # Returns +true+ if the log level allows entries with severity
535
- # Logger::FATAL to be written, +false+ otherwise.
536
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
537
- #
538
- # @return [Boolean]
539
- #
540
- # source://logger//lib/logger.rb#526
541
- def fatal?; end
542
-
543
- # Sets or retrieves the logger entry formatter proc.
544
- #
545
- # When +formatter+ is +nil+, the logger uses Logger::Formatter.
546
- #
547
- # When +formatter+ is a proc, a new entry is formatted by the proc,
548
- # which is called with four arguments:
549
- #
550
- # - +severity+: The severity of the entry.
551
- # - +time+: A Time object representing the entry's timestamp.
552
- # - +progname+: The program name for the entry.
553
- # - +msg+: The message for the entry (string or string-convertible object).
554
- #
555
- # The proc should return a string containing the formatted entry.
556
- #
557
- # This custom formatter uses
558
- # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
559
- # to escape the message string:
560
- #
561
- # logger = Logger.new($stdout, progname: 'mung')
562
- # original_formatter = logger.formatter || Logger::Formatter.new
563
- # logger.formatter = proc { |severity, time, progname, msg|
564
- # original_formatter.call(severity, time, progname, msg.dump)
565
- # }
566
- # logger.add(Logger::INFO, "hello \n ''")
567
- # logger.add(Logger::INFO, "\f\x00\xff\\\"")
568
- #
569
- # Output:
570
- #
571
- # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
572
- # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
573
- #
574
- # source://logger//lib/logger.rb#473
575
- def formatter; end
576
-
577
- # Sets or retrieves the logger entry formatter proc.
578
- #
579
- # When +formatter+ is +nil+, the logger uses Logger::Formatter.
580
- #
581
- # When +formatter+ is a proc, a new entry is formatted by the proc,
582
- # which is called with four arguments:
583
- #
584
- # - +severity+: The severity of the entry.
585
- # - +time+: A Time object representing the entry's timestamp.
586
- # - +progname+: The program name for the entry.
587
- # - +msg+: The message for the entry (string or string-convertible object).
588
- #
589
- # The proc should return a string containing the formatted entry.
590
- #
591
- # This custom formatter uses
592
- # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
593
- # to escape the message string:
594
- #
595
- # logger = Logger.new($stdout, progname: 'mung')
596
- # original_formatter = logger.formatter || Logger::Formatter.new
597
- # logger.formatter = proc { |severity, time, progname, msg|
598
- # original_formatter.call(severity, time, progname, msg.dump)
599
- # }
600
- # logger.add(Logger::INFO, "hello \n ''")
601
- # logger.add(Logger::INFO, "\f\x00\xff\\\"")
602
- #
603
- # Output:
604
- #
605
- # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
606
- # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
607
- #
608
- # source://logger//lib/logger.rb#473
609
- def formatter=(_arg0); end
610
-
611
- # Equivalent to calling #add with severity <tt>Logger::INFO</tt>.
612
- #
613
- # source://logger//lib/logger.rb#701
614
- def info(progname = T.unsafe(nil), &block); end
615
-
616
- # Sets the log level to Logger::INFO.
617
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
618
- #
619
- # source://logger//lib/logger.rb#498
620
- def info!; end
621
-
622
- # Returns +true+ if the log level allows entries with severity
623
- # Logger::INFO to be written, +false+ otherwise.
624
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
625
- #
626
- # @return [Boolean]
627
- #
628
- # source://logger//lib/logger.rb#493
629
- def info?; end
630
-
631
- # Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
632
- #
633
- # source://logger//lib/logger.rb#383
634
- def level; end
635
-
636
- # Sets the log level; returns +severity+.
637
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
638
- #
639
- # Argument +severity+ may be an integer, a string, or a symbol:
640
- #
641
- # logger.level = Logger::ERROR # => 3
642
- # logger.level = 3 # => 3
643
- # logger.level = 'error' # => "error"
644
- # logger.level = :error # => :error
645
- #
646
- # Logger#sev_threshold= is an alias for Logger#level=.
647
- #
648
- # source://logger//lib/logger.rb#399
649
- def level=(severity); end
650
-
651
- # Creates a log entry, which may or may not be written to the log,
652
- # depending on the entry's severity and on the log level.
653
- # See {Log Level}[rdoc-ref:Logger@Log+Level]
654
- # and {Entries}[rdoc-ref:Logger@Entries] for details.
655
- #
656
- # Examples:
657
- #
658
- # logger = Logger.new($stdout, progname: 'mung')
659
- # logger.add(Logger::INFO)
660
- # logger.add(Logger::ERROR, 'No good')
661
- # logger.add(Logger::ERROR, 'No good', 'gnum')
662
- #
663
- # Output:
664
- #
665
- # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
666
- # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
667
- # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
668
- #
669
- # These convenience methods have implicit severity:
670
- #
671
- # - #debug.
672
- # - #info.
673
- # - #warn.
674
- # - #error.
675
- # - #fatal.
676
- # - #unknown.
677
- #
678
- # source://logger//lib/logger.rb#656
679
- def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
680
-
681
- # Program name to include in log messages.
682
- #
683
- # source://logger//lib/logger.rb#422
684
- def progname; end
685
-
686
- # Program name to include in log messages.
687
- #
688
- # source://logger//lib/logger.rb#422
689
- def progname=(_arg0); end
690
-
691
- # Sets the logger's output stream:
692
- #
693
- # - If +logdev+ is +nil+, reopens the current output stream.
694
- # - If +logdev+ is a filepath, opens the indicated file for append.
695
- # - If +logdev+ is an IO stream
696
- # (usually <tt>$stdout</tt>, <tt>$stderr</tt>, or an open File object),
697
- # opens the stream for append.
698
- #
699
- # Example:
700
- #
701
- # logger = Logger.new('t.log')
702
- # logger.add(Logger::ERROR, 'one')
703
- # logger.close
704
- # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream'
705
- # logger.reopen
706
- # logger.add(Logger::ERROR, 'three')
707
- # logger.close
708
- # File.readlines('t.log')
709
- # # =>
710
- # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n",
711
- # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n",
712
- # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"]
713
- #
714
- # source://logger//lib/logger.rb#624
715
- def reopen(logdev = T.unsafe(nil)); end
716
-
717
- # Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
718
- #
719
- # source://logger//lib/logger.rb#383
720
- def sev_threshold; end
721
-
722
- # Sets the log level; returns +severity+.
723
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
724
- #
725
- # Argument +severity+ may be an integer, a string, or a symbol:
726
- #
727
- # logger.level = Logger::ERROR # => 3
728
- # logger.level = 3 # => 3
729
- # logger.level = 'error' # => "error"
730
- # logger.level = :error # => :error
731
- #
732
- # Logger#sev_threshold= is an alias for Logger#level=.
733
- #
734
- # source://logger//lib/logger.rb#399
735
- def sev_threshold=(severity); end
736
-
737
- # Equivalent to calling #add with severity <tt>Logger::UNKNOWN</tt>.
738
- #
739
- # source://logger//lib/logger.rb#725
740
- def unknown(progname = T.unsafe(nil), &block); end
741
-
742
- # Equivalent to calling #add with severity <tt>Logger::WARN</tt>.
743
- #
744
- # source://logger//lib/logger.rb#707
745
- def warn(progname = T.unsafe(nil), &block); end
746
-
747
- # Sets the log level to Logger::WARN.
748
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
749
- #
750
- # source://logger//lib/logger.rb#509
751
- def warn!; end
752
-
753
- # Returns +true+ if the log level allows entries with severity
754
- # Logger::WARN to be written, +false+ otherwise.
755
- # See {Log Level}[rdoc-ref:Logger@Log+Level].
756
- #
757
- # @return [Boolean]
758
- #
759
- # source://logger//lib/logger.rb#504
760
- def warn?; end
761
-
762
- # Adjust the log level during the block execution for the current Fiber only
763
- #
764
- # logger.with_level(:debug) do
765
- # logger.debug { "Hello" }
766
- # end
767
- #
768
- # source://logger//lib/logger.rb#408
769
- def with_level(severity); end
770
-
771
- private
772
-
773
- # source://logger//lib/logger.rb#758
774
- def format_message(severity, datetime, progname, msg); end
775
-
776
- # source://logger//lib/logger.rb#745
777
- def format_severity(severity); end
778
-
779
- # source://logger//lib/logger.rb#754
780
- def level_key; end
781
-
782
- # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
783
- #
784
- # source://logger//lib/logger.rb#750
785
- def level_override; end
786
- end
787
-
788
- # Default formatter for log messages.
789
- #
790
- # source://logger//lib/logger/formatter.rb#5
791
- class Logger::Formatter
792
- # @return [Formatter] a new instance of Formatter
793
- #
794
- # source://logger//lib/logger/formatter.rb#11
795
- def initialize; end
796
-
797
- # source://logger//lib/logger/formatter.rb#15
798
- def call(severity, time, progname, msg); end
799
-
800
- # Returns the value of attribute datetime_format.
801
- #
802
- # source://logger//lib/logger/formatter.rb#9
803
- def datetime_format; end
804
-
805
- # Sets the attribute datetime_format
806
- #
807
- # @param value the value to set the attribute datetime_format to.
808
- #
809
- # source://logger//lib/logger/formatter.rb#9
810
- def datetime_format=(_arg0); end
811
-
812
- private
813
-
814
- # source://logger//lib/logger/formatter.rb#21
815
- def format_datetime(time); end
816
-
817
- # source://logger//lib/logger/formatter.rb#25
818
- def msg2str(msg); end
819
- end
820
-
821
- # source://logger//lib/logger/formatter.rb#7
822
- Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String)
823
-
824
- # source://logger//lib/logger/formatter.rb#6
825
- Logger::Formatter::Format = T.let(T.unsafe(nil), String)
826
-
827
- # Device used for logging messages.
828
- #
829
- # source://logger//lib/logger/log_device.rb#7
830
- class Logger::LogDevice
831
- include ::Logger::Period
832
- include ::MonitorMixin
833
-
834
- # @return [LogDevice] a new instance of LogDevice
835
- #
836
- # source://logger//lib/logger/log_device.rb#14
837
- def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end
838
-
839
- # source://logger//lib/logger/log_device.rb#59
840
- def close; end
841
-
842
- # Returns the value of attribute dev.
843
- #
844
- # source://logger//lib/logger/log_device.rb#10
845
- def dev; end
846
-
847
- # Returns the value of attribute filename.
848
- #
849
- # source://logger//lib/logger/log_device.rb#11
850
- def filename; end
851
-
852
- # source://logger//lib/logger/log_device.rb#69
853
- def reopen(log = T.unsafe(nil)); end
854
-
855
- # source://logger//lib/logger/log_device.rb#32
856
- def write(message); end
857
-
858
- private
859
-
860
- # source://logger//lib/logger/log_device.rb#126
861
- def add_log_header(file); end
862
-
863
- # source://logger//lib/logger/log_device.rb#132
864
- def check_shift_log; end
865
-
866
- # source://logger//lib/logger/log_device.rb#110
867
- def create_logfile(filename); end
868
-
869
- # source://logger//lib/logger/log_device.rb#152
870
- def lock_shift_log; end
871
-
872
- # source://logger//lib/logger/log_device.rb#102
873
- def open_logfile(filename); end
874
-
875
- # source://logger//lib/logger/log_device.rb#86
876
- def set_dev(log); end
877
-
878
- # source://logger//lib/logger/log_device.rb#183
879
- def shift_log_age; end
880
-
881
- # source://logger//lib/logger/log_device.rb#195
882
- def shift_log_period(period_end); end
883
- end
884
-
885
- # source://logger//lib/logger/period.rb#4
886
- module Logger::Period
887
- private
888
-
889
- # source://logger//lib/logger/period.rb#9
890
- def next_rotate_time(now, shift_age); end
891
-
892
- # source://logger//lib/logger/period.rb#31
893
- def previous_period_end(now, shift_age); end
894
-
895
- class << self
896
- # source://logger//lib/logger/period.rb#9
897
- def next_rotate_time(now, shift_age); end
898
-
899
- # source://logger//lib/logger/period.rb#31
900
- def previous_period_end(now, shift_age); end
901
- end
902
- end
903
-
904
- # source://logger//lib/logger/period.rb#7
905
- Logger::Period::SiD = T.let(T.unsafe(nil), Integer)
906
-
907
- # \Severity label for logging (max 5 chars).
908
- #
909
- # source://logger//lib/logger.rb#743
910
- Logger::SEV_LABEL = T.let(T.unsafe(nil), Array)
911
-
912
- # Logging severity.
913
- #
914
- # source://logger//lib/logger/severity.rb#5
915
- module Logger::Severity
916
- class << self
917
- # source://logger//lib/logger/severity.rb#29
918
- def coerce(severity); end
919
- end
920
- end
921
-
922
- # source://logger//lib/logger/severity.rb#19
923
- Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash)