logster 1.2.11 → 1.3.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +18 -17
  3. data/.travis.yml +15 -16
  4. data/CHANGELOG.md +130 -130
  5. data/Gemfile +4 -4
  6. data/Guardfile +8 -8
  7. data/LICENSE.txt +22 -22
  8. data/README.md +99 -96
  9. data/Rakefile +24 -23
  10. data/assets/fonts/FontAwesome.otf +0 -0
  11. data/assets/fonts/fontawesome-webfont.eot +0 -0
  12. data/assets/fonts/fontawesome-webfont.svg +639 -639
  13. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  14. data/assets/fonts/fontawesome-webfont.woff +0 -0
  15. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  16. data/assets/images/Icon-144_rounded.png +0 -0
  17. data/assets/images/Icon-144_square.png +0 -0
  18. data/assets/images/icon_144x144.png +0 -0
  19. data/assets/images/icon_64x64.png +0 -0
  20. data/assets/javascript/client-app.js +81 -0
  21. data/assets/javascript/vendor.js +5302 -0
  22. data/assets/stylesheets/client-app.css +1 -0
  23. data/assets/stylesheets/vendor.css +4 -0
  24. data/build_client_app.sh +12 -0
  25. data/client-app/.editorconfig +20 -0
  26. data/client-app/.ember-cli +9 -0
  27. data/client-app/.eslintignore +19 -0
  28. data/client-app/.eslintrc.js +46 -0
  29. data/client-app/.gitignore +23 -0
  30. data/client-app/.travis.yml +27 -0
  31. data/client-app/.watchmanconfig +3 -0
  32. data/client-app/README.md +57 -0
  33. data/client-app/app/app.js +14 -0
  34. data/client-app/app/components/message-info.js +18 -0
  35. data/client-app/app/components/message-row.js +45 -0
  36. data/client-app/app/components/panel-resizer.js +75 -0
  37. data/client-app/app/components/tab-contents.js +27 -0
  38. data/client-app/app/components/tab-link.js +5 -0
  39. data/client-app/app/components/tabbed-section.js +32 -0
  40. data/client-app/app/components/time-formatter.js +25 -0
  41. data/client-app/app/components/update-time.js +21 -0
  42. data/client-app/app/controllers/index.js +83 -0
  43. data/client-app/app/controllers/show.js +13 -0
  44. data/client-app/app/index.html +29 -0
  45. data/client-app/app/initializers/app-init.js +55 -0
  46. data/client-app/app/lib/preload.js +14 -0
  47. data/client-app/app/lib/utilities.js +140 -0
  48. data/client-app/app/models/message-collection.js +158 -0
  49. data/client-app/app/models/message.js +99 -0
  50. data/client-app/app/resolver.js +3 -0
  51. data/client-app/app/router.js +14 -0
  52. data/client-app/app/routes/index.js +53 -0
  53. data/client-app/app/routes/show.js +14 -0
  54. data/{assets/stylesheets → client-app/app/styles}/app.css +387 -390
  55. data/{assets/javascript → client-app/app}/templates/application.hbs +2 -2
  56. data/client-app/app/templates/components/message-info.hbs +44 -0
  57. data/{assets/javascript → client-app/app/templates}/components/message-row.hbs +17 -17
  58. data/client-app/app/templates/components/tabbed-section.hbs +10 -0
  59. data/client-app/app/templates/components/time-formatter.hbs +1 -0
  60. data/{assets/javascript → client-app/app}/templates/index.hbs +57 -57
  61. data/{assets/javascript → client-app/app}/templates/show.hbs +4 -4
  62. data/client-app/config/environment.js +51 -0
  63. data/client-app/config/optional-features.json +3 -0
  64. data/client-app/config/targets.js +18 -0
  65. data/client-app/ember-cli-build.js +29 -0
  66. data/client-app/package-lock.json +11365 -0
  67. data/client-app/package.json +56 -0
  68. data/client-app/testem.js +25 -0
  69. data/client-app/tests/index.html +34 -0
  70. data/client-app/tests/integration/components/message-info-test.js +26 -0
  71. data/client-app/tests/integration/components/message-row-test.js +26 -0
  72. data/client-app/tests/integration/components/panel-resizer-test.js +26 -0
  73. data/client-app/tests/integration/components/tab-contents-test.js +26 -0
  74. data/client-app/tests/integration/components/tab-link-test.js +26 -0
  75. data/client-app/tests/integration/components/tabbed-section-test.js +26 -0
  76. data/client-app/tests/integration/components/time-formatter-test.js +26 -0
  77. data/client-app/tests/integration/components/update-time-test.js +26 -0
  78. data/client-app/tests/test-helper.js +8 -0
  79. data/client-app/tests/unit/controllers/index-test.js +12 -0
  80. data/client-app/tests/unit/controllers/show-test.js +12 -0
  81. data/client-app/tests/unit/initializers/app-init-test.js +31 -0
  82. data/client-app/tests/unit/routes/index-test.js +11 -0
  83. data/client-app/tests/unit/routes/show-test.js +11 -0
  84. data/lib/examples/sidekiq_logster_reporter.rb +21 -21
  85. data/lib/logster.rb +54 -54
  86. data/lib/logster/base_store.rb +130 -130
  87. data/lib/logster/configuration.rb +25 -25
  88. data/lib/logster/ignore_pattern.rb +65 -65
  89. data/lib/logster/logger.rb +102 -101
  90. data/lib/logster/message.rb +227 -226
  91. data/lib/logster/middleware/debug_exceptions.rb +26 -26
  92. data/lib/logster/middleware/reporter.rb +56 -54
  93. data/lib/logster/middleware/viewer.rb +220 -251
  94. data/lib/logster/rails/railtie.rb +58 -58
  95. data/lib/logster/redis_store.rb +481 -477
  96. data/lib/logster/version.rb +3 -3
  97. data/lib/logster/web.rb +14 -14
  98. data/logster.gemspec +34 -33
  99. data/test/examples/test_sidekiq_reporter_example.rb +46 -46
  100. data/test/fake_data/Gemfile +4 -4
  101. data/test/fake_data/generate.rb +10 -10
  102. data/test/logster/middleware/test_reporter.rb +21 -21
  103. data/test/logster/middleware/test_viewer.rb +96 -70
  104. data/test/logster/test_base_store.rb +147 -147
  105. data/test/logster/test_ignore_pattern.rb +41 -41
  106. data/test/logster/test_logger.rb +74 -74
  107. data/test/logster/test_message.rb +34 -34
  108. data/test/logster/test_redis_rate_limiter.rb +230 -230
  109. data/test/logster/test_redis_store.rb +427 -414
  110. data/test/test_helper.rb +38 -37
  111. data/vendor/assets/javascripts/logster.js.erb +39 -39
  112. metadata +83 -24
  113. data/assets/javascript/app.js +0 -817
  114. data/assets/javascript/components/message-info.hbs +0 -47
  115. data/assets/javascript/components/panel-resizer.hbs +0 -0
  116. data/assets/javascript/components/tab-contents.hbs +0 -1
  117. data/assets/javascript/components/tab-link.hbs +0 -1
  118. data/assets/javascript/components/tabbed-section.hbs +0 -6
  119. data/assets/javascript/external/ember-template-compiler.js +0 -22346
  120. data/assets/javascript/external/ember.js +0 -58500
  121. data/assets/javascript/external/ember.min.js +0 -17
  122. data/assets/javascript/external/jquery.min.js +0 -5
  123. data/assets/javascript/external/lodash.min.js +0 -87
  124. data/assets/javascript/external/moment.min.js +0 -6
  125. data/assets/stylesheets/font-awesome.min.css +0 -4
  126. data/bower.json +0 -25
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "client-app",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "description": "Logging framework and viewer",
6
+ "repository": "https://github.com/discourse/logster/",
7
+ "license": "MIT",
8
+ "author": "Sam Saffron",
9
+ "directories": {
10
+ "doc": "doc",
11
+ "test": "tests"
12
+ },
13
+ "scripts": {
14
+ "build": "ember build",
15
+ "lint:hbs": "ember-template-lint .",
16
+ "lint:js": "eslint .",
17
+ "start": "ember serve",
18
+ "test": "ember test"
19
+ },
20
+ "devDependencies": {
21
+ "@ember/jquery": "^0.5.2",
22
+ "@ember/optional-features": "^0.6.3",
23
+ "broccoli-asset-rev": "^2.7.0",
24
+ "ember-ajax": "^3.1.0",
25
+ "ember-cli": "~3.5.0",
26
+ "ember-cli-app-version": "^3.2.0",
27
+ "ember-cli-babel": "^6.16.0",
28
+ "ember-cli-dependency-checker": "^3.0.0",
29
+ "ember-cli-eslint": "^4.2.3",
30
+ "ember-cli-htmlbars": "^3.0.0",
31
+ "ember-cli-htmlbars-inline-precompile": "^1.0.3",
32
+ "ember-cli-inject-live-reload": "^1.8.2",
33
+ "ember-cli-sri": "^2.1.1",
34
+ "ember-cli-template-lint": "^1.0.0-beta.1",
35
+ "ember-cli-uglify": "^2.1.0",
36
+ "ember-data": "~3.5.0",
37
+ "ember-export-application-global": "^2.0.0",
38
+ "ember-font-awesome": "^4.0.0-rc.4",
39
+ "ember-load-initializers": "^1.1.0",
40
+ "ember-maybe-import-regenerator": "^0.1.6",
41
+ "ember-qunit": "^3.4.1",
42
+ "ember-resolver": "^5.0.1",
43
+ "ember-source": "~3.5.0",
44
+ "ember-welcome-page": "^3.2.0",
45
+ "eslint-plugin-ember": "^5.2.0",
46
+ "loader.js": "^4.7.0",
47
+ "qunit-dom": "^0.8.0"
48
+ },
49
+ "engines": {
50
+ "node": "6.* || 8.* || >= 10.*"
51
+ },
52
+ "dependencies": {
53
+ "lodash": "~4.17.11",
54
+ "moment": "~2.22.2"
55
+ }
56
+ }
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ test_page: 'tests/index.html?hidepassed',
3
+ disable_watching: true,
4
+ launch_in_ci: [
5
+ 'Chrome'
6
+ ],
7
+ launch_in_dev: [
8
+ 'Chrome'
9
+ ],
10
+ browser_args: {
11
+ Chrome: {
12
+ ci: [
13
+ // --no-sandbox is needed when running Chrome inside a container
14
+ process.env.CI ? '--no-sandbox' : null,
15
+ '--headless',
16
+ '--disable-gpu',
17
+ '--disable-dev-shm-usage',
18
+ '--disable-software-rasterizer',
19
+ '--mute-audio',
20
+ '--remote-debugging-port=0',
21
+ '--window-size=1440,900'
22
+ ].filter(Boolean)
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,34 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <title>ClientApp Tests</title>
7
+ <meta name="description" content="">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <meta id="preloaded-data" data-root-path="/logs" data-preloaded="{}">
10
+
11
+ {{content-for "head"}}
12
+ {{content-for "test-head"}}
13
+
14
+ <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
15
+ <link rel="stylesheet" href="{{rootURL}}assets/client-app.css">
16
+ <link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
17
+
18
+ {{content-for "head-footer"}}
19
+ {{content-for "test-head-footer"}}
20
+ </head>
21
+ <body>
22
+ {{content-for "body"}}
23
+ {{content-for "test-body"}}
24
+
25
+ <script src="/testem.js" integrity=""></script>
26
+ <script src="{{rootURL}}assets/vendor.js"></script>
27
+ <script src="{{rootURL}}assets/test-support.js"></script>
28
+ <script src="{{rootURL}}assets/client-app.js"></script>
29
+ <script src="{{rootURL}}assets/tests.js"></script>
30
+
31
+ {{content-for "body-footer"}}
32
+ {{content-for "test-body-footer"}}
33
+ </body>
34
+ </html>
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | message-info', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{message-info}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#message-info}}
20
+ template block text
21
+ {{/message-info}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | message-row', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{message-row}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#message-row}}
20
+ template block text
21
+ {{/message-row}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | panel-resizer', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{panel-resizer}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#panel-resizer}}
20
+ template block text
21
+ {{/panel-resizer}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | tab-contents', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{tab-contents}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#tab-contents}}
20
+ template block text
21
+ {{/tab-contents}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | tab-link', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{tab-link}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#tab-link}}
20
+ template block text
21
+ {{/tab-link}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | tabbed-section', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{tabbed-section}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#tabbed-section}}
20
+ template block text
21
+ {{/tabbed-section}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | time-formatter', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{time-formatter}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#time-formatter}}
20
+ template block text
21
+ {{/time-formatter}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupRenderingTest } from 'ember-qunit';
3
+ import { render } from '@ember/test-helpers';
4
+ import hbs from 'htmlbars-inline-precompile';
5
+
6
+ module('Integration | Component | update-time', function(hooks) {
7
+ setupRenderingTest(hooks);
8
+
9
+ test('it renders', async function(assert) {
10
+ // Set any properties with this.set('myProperty', 'value');
11
+ // Handle any actions with this.set('myAction', function(val) { ... });
12
+
13
+ await render(hbs`{{update-time}}`);
14
+
15
+ assert.equal(this.element.textContent.trim(), '');
16
+
17
+ // Template block usage:
18
+ await render(hbs`
19
+ {{#update-time}}
20
+ template block text
21
+ {{/update-time}}
22
+ `);
23
+
24
+ assert.equal(this.element.textContent.trim(), 'template block text');
25
+ });
26
+ });
@@ -0,0 +1,8 @@
1
+ import Application from '../app';
2
+ import config from '../config/environment';
3
+ import { setApplication } from '@ember/test-helpers';
4
+ import { start } from 'ember-qunit';
5
+
6
+ setApplication(Application.create(config.APP));
7
+
8
+ start();
@@ -0,0 +1,12 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from 'ember-qunit';
3
+
4
+ module('Unit | Controller | index', function(hooks) {
5
+ setupTest(hooks);
6
+
7
+ // Replace this with your real tests.
8
+ test('it exists', function(assert) {
9
+ let controller = this.owner.lookup('controller:index');
10
+ assert.ok(controller);
11
+ });
12
+ });
@@ -0,0 +1,12 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from 'ember-qunit';
3
+
4
+ module('Unit | Controller | show', function(hooks) {
5
+ setupTest(hooks);
6
+
7
+ // Replace this with your real tests.
8
+ test('it exists', function(assert) {
9
+ let controller = this.owner.lookup('controller:show');
10
+ assert.ok(controller);
11
+ });
12
+ });
@@ -0,0 +1,31 @@
1
+ import Application from '@ember/application';
2
+
3
+ import { initialize } from 'client-app/initializers/app-init';
4
+ import { module, test } from 'qunit';
5
+ import { setupTest } from 'ember-qunit';
6
+ import { run } from '@ember/runloop';
7
+
8
+ module('Unit | Initializer | app-init', function(hooks) {
9
+ setupTest(hooks);
10
+
11
+ hooks.beforeEach(function() {
12
+ this.TestApplication = Application.extend();
13
+ this.TestApplication.initializer({
14
+ name: 'initializer under test',
15
+ initialize
16
+ });
17
+
18
+ this.application = this.TestApplication.create({ autoboot: false });
19
+ });
20
+
21
+ hooks.afterEach(function() {
22
+ run(this.application, 'destroy');
23
+ });
24
+
25
+ // Replace this with your real tests.
26
+ test('it works', async function(assert) {
27
+ await this.application.boot();
28
+
29
+ assert.ok(true);
30
+ });
31
+ });
@@ -0,0 +1,11 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from 'ember-qunit';
3
+
4
+ module('Unit | Route | index', function(hooks) {
5
+ setupTest(hooks);
6
+
7
+ test('it exists', function(assert) {
8
+ let route = this.owner.lookup('route:index');
9
+ assert.ok(route);
10
+ });
11
+ });
@@ -0,0 +1,11 @@
1
+ import { module, test } from 'qunit';
2
+ import { setupTest } from 'ember-qunit';
3
+
4
+ module('Unit | Route | show', function(hooks) {
5
+ setupTest(hooks);
6
+
7
+ test('it exists', function(assert) {
8
+ let route = this.owner.lookup('route:show');
9
+ assert.ok(route);
10
+ });
11
+ });
@@ -1,21 +1,21 @@
1
- class SidekiqLogsterReporter
2
- def call(ex, context={})
3
- # Pass context to Logster
4
- fake_env = {}
5
- context.each do |key, value|
6
- Logster.add_to_env(fake_env, key, value)
7
- end
8
-
9
- text = "Job exception: #{ex}\n"
10
- if ex.backtrace
11
- Logster.add_to_env(fake_env, :backtrace, ex.backtrace)
12
- end
13
-
14
- Thread.current[Logster::Logger::LOGSTER_ENV] = fake_env
15
- Logster.logger.error(text)
16
- rescue => e
17
- Logster.logger.fatal("Failed to log exception #{ex} #{hash}\nReason: #{e.class} #{e}\n#{e.backtrace.join("\n")}")
18
- ensure
19
- Thread.current[Logster::Logger::LOGSTER_ENV] = nil
20
- end
21
- end
1
+ class SidekiqLogsterReporter
2
+ def call(ex, context={})
3
+ # Pass context to Logster
4
+ fake_env = {}
5
+ context.each do |key, value|
6
+ Logster.add_to_env(fake_env, key, value)
7
+ end
8
+
9
+ text = "Job exception: #{ex}\n"
10
+ if ex.backtrace
11
+ Logster.add_to_env(fake_env, :backtrace, ex.backtrace)
12
+ end
13
+
14
+ Thread.current[Logster::Logger::LOGSTER_ENV] = fake_env
15
+ Logster.logger.error(text)
16
+ rescue => e
17
+ Logster.logger.fatal("Failed to log exception #{ex} #{hash}\nReason: #{e.class} #{e}\n#{e.backtrace.join("\n")}")
18
+ ensure
19
+ Thread.current[Logster::Logger::LOGSTER_ENV] = nil
20
+ end
21
+ end