-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 (RUMM-127): Update Readme to include migration guide
- Loading branch information
Showing
2 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Migrating to 1.0.0 | ||
|
||
If you've been using the former SDK (version `0.1.x` or `0.2.x`), there are some breaking changes | ||
introduced in version `1.0.0`, namely: | ||
|
||
### Logger.Builder | ||
|
||
#### Before | ||
|
||
```java | ||
logger = new LoggerBuilder() | ||
.withName("my-application-name") // This would set the service name | ||
.withNetworkInfoLogging(this) | ||
.build("my-api-key"); | ||
``` | ||
|
||
#### After | ||
|
||
```java | ||
Datadog.initialize(context, "my-api-key"); | ||
|
||
// … | ||
|
||
logger = new Logger.Builder() | ||
.setNetworkInfoEnabled(true) | ||
.setServiceName("android-sample-java") // Sets the service name | ||
.setLoggerName("my_logger") // Sets the logger name (within the service) | ||
.setLogcatLogsEnabled(true) | ||
.build(); | ||
``` | ||
#### Attributes | ||
|
||
The attributes were created or removed with the `Logger.addField()` or `Logger.removeField()` | ||
methods. These methods were rename for consistency purposes, and are now `Logger.addAttribute()` | ||
and`Logger.removeAttribute()`, but they will behave the same way as the old ones. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters