@honeybadger-io/react-native 0.0.6 → 0.0.9

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/CHANGELOG.md ADDED
@@ -0,0 +1,45 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.0.9] - 2022-02-23
8
+ ### Added
9
+ - Add support for the `reportErrors` configuration option.
10
+
11
+ ## [0.0.8] - 2021-08-12
12
+ ### Added
13
+ - Add support for `revision` and `projectRoot` configuration options.
14
+ - Add TypeScript definitions.
15
+
16
+ ## [0.0.7] - 2021-06-17
17
+ ### Fixed
18
+ - Allow the default JS error handler to process the error after we're done with it so that RN shows the useful red info box in dev.
19
+
20
+ ## [0.0.6] - 2021-06-17
21
+ ### Added
22
+ - Added ability to differentiate and configure console output by log level, eliminating frivolous logging.
23
+
24
+ ## [0.0.5] - 2021-06-15
25
+ ### Fixed
26
+ - Removed regex named capture groups in favor of numeric capture groups in order to be able to support the Hermes JS engine.
27
+
28
+ ## [0.0.4] - 2021-03-24
29
+ ### Added
30
+ - honeybadger-generate-sourcemaps now generates main.jsbundle files for both iOS and Android.
31
+
32
+ ## [0.0.3] - 2021-02-24
33
+ ### Changed
34
+ - Changed the package of the native module for Android to io.honeybadger
35
+
36
+ ## [0.0.2] - 2021-02-23
37
+ ### Changed
38
+ - Rename the stackAddress key to stack_address to be more consistent with the HB spec.
39
+
40
+ ### Added
41
+ - Allow for changing of the HB API key.
42
+
43
+ ## [0.0.1] - 2021-02-15
44
+ ### Added
45
+ - Initial release
package/README.md CHANGED
@@ -29,6 +29,29 @@ export default function App() {
29
29
 
30
30
  You can log into your [Honeybadger](https://honeybadger.io) account to obtain your API key.
31
31
 
32
+
33
+ ## Configuration
34
+
35
+ The configure method takes additional configuration options.
36
+
37
+ | Name | Type | Required | Default | Example |
38
+ | ----- | ---- | ------- | ------- | ------- |
39
+ | apiKey | String | YES | `""` | `"hb-api-key-1234"` |
40
+ | reportErrors | Boolean | NO | true |
41
+ | revision | String | NO | `""` | `"8afb34a"` |
42
+ | projectRoot | String | NO | `""` | `"/path/to/project"` |
43
+
44
+ ```js
45
+ Honeybadger.configure(
46
+ "hb-api-key-1234",
47
+ "8afb34a",
48
+ "/path/to/project"
49
+ );
50
+ ```
51
+
52
+ The **reportErrors** parameter determines if errors are to be sent to Honeybadger. This is set to **true** by default. In certain environments, say, during development, it could be useful to set **reportErrors** to **false** to prevent errors from being posted to your Honeybadger account.
53
+
54
+
32
55
  ## Usage Examples
33
56
 
34
57
  iOS, Android, and JavaScript errors will be automatically handled by the Honeybadger React Native library, by default. But you can also use the following API to customize error handling in your application.
@@ -52,6 +75,27 @@ Honeybadger.setContext({
52
75
 
53
76
  If you've used **Honeybadger.setContext()** to store context data, you can use **Honeybadger.resetContext()** to clear that data.
54
77
 
78
+ ### Honeybadger.setLogLevel(logLevel)
79
+
80
+ Sets the logging level for the Honeybadger library.
81
+
82
+ ```js
83
+ Honeybadger.setLogLevel("debug");
84
+ ```
85
+
86
+ The following values are accepted:
87
+
88
+ | Value | Meaning |
89
+ | ----- | ---- |
90
+ | "debug" | Everything will be logged to console. |
91
+ | "warning" | Only warnings will be logged to console. |
92
+ | "error" | Only errors will be logged to console. |
93
+
94
+
95
+ The default logging level is "warning".
96
+
97
+
98
+
55
99
  ## Source Maps
56
100
 
57
101
  This package includes a script that will help you generate source maps for your project. To generate source maps for both iOS and Android, run the following from your project root directory.