@vpmedia/simplify 1.39.0 → 1.41.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.39.0",
3
+ "version": "1.41.0",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
- import { addBreadcrumb, captureException } from '@sentry/browser';
1
+ import { addBreadcrumb, captureException, captureMessage } from '@sentry/browser';
2
2
  import { AbstractLogHandler } from './AbstractLogHandler.js';
3
- import { LOG_LEVEL_DEBUG } from './const.js';
3
+ import { LOG_LEVEL_DEBUG, LOG_LEVEL_WARNING } from './const.js';
4
4
  import { getLogLevelName } from './util.js';
5
5
 
6
6
  const BREADCRUMB_CATEGORY = 'log';
@@ -42,6 +42,10 @@ export class SentryLogHandler extends AbstractLogHandler {
42
42
  }
43
43
  if (error) {
44
44
  extra?.tags ? captureException(error, { tags: extra.tags }) : captureException(error);
45
+ } else if (level === LOG_LEVEL_WARNING) {
46
+ extra?.tags
47
+ ? captureMessage(logMessage, { level: 'warning', tags: extra.tags })
48
+ : captureMessage(logMessage, { level: 'warning' });
45
49
  }
46
50
  }
47
51
  }
@@ -16,7 +16,7 @@ import {
16
16
  } from './const.js';
17
17
  import { DOCUMENT_STATE_CHANGE_EVENT, PAGE_LIFECYCLE_STATE_CHANGE_EVENT } from './event.js';
18
18
 
19
- const logger = new Logger('PageLifecycle');
19
+ const logger = new Logger('pagelifecycle');
20
20
 
21
21
  const eventEmitter = new EventEmitter();
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"SentryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/SentryLogHandler.js"],"names":[],"mappings":"AAOA;IACE;;;OAGG;IACH,oBAFW,MAAM,EAIhB;CAgCF;mCA7CkC,yBAAyB"}
1
+ {"version":3,"file":"SentryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/SentryLogHandler.js"],"names":[],"mappings":"AAOA;IACE;;;OAGG;IACH,oBAFW,MAAM,EAIhB;CAoCF;mCAjDkC,yBAAyB"}