Skip to content

Commit 0e382ee

Browse files
Updated README.md
1 parent f5377bc commit 0e382ee

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

README.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This is a small package to remove the boiler plate code for debugging an android
1212
}
1313

1414
dependencies {
15-
implementation 'com.github.FernandoCCNunes:debug-android:1.0'
15+
implementation 'com.github.FernandoCCNunes:debug-android:1.1'
1616
}
1717

1818
#### Maven:
@@ -57,7 +57,8 @@ This is a small package to remove the boiler plate code for debugging an android
5757
DebugManager.init(
5858
DebuggerSettings.Builder(this, BuildConfig.DEBUG)
5959
.setDefaultTag("DebugExample")
60-
.setUseSingleTag(bUseSingleTag = true, bDisplayCustomTags = false)
60+
.setUseSingleTag(true)
61+
.setDisplayCustomTags(true)
6162
.build()
6263
)
6364
}
@@ -80,15 +81,46 @@ This is a small package to remove the boiler plate code for debugging an android
8081

8182
# Extra Documentation
8283

83-
| Class/Function | Params | Description | Default |
84-
| -------------- | ------ | ----------- | ---------------- |
85-
| DebugManager.init() | DebuggerSettings | Initializes the DebugManager with custom settings | N/A
86-
| DebuggerSettings() | Context, Boolean | Takes in a Context and a Boolean that handles whether to display or skip the logs | N/A
87-
| DebuggerSettings.Builder() | Context, Boolean | Same as the primary constructor, but allows for more configuration | N/A
88-
| DebuggerSettings.Builder().setDefaultTag()| String | The default tag to be used if **bUseSingleTag** is set to **true** or no tag is defined in the debug functions. | AppName |
89-
| DebuggerSettings.Builder().setUseSingleTag()| Boolean | Whether to use only one tag for all the logs or allow for custom tags <br/> **true** = Only default tag is used <br/> **false** = Custom tags are used if defined, otherwise default tag is used | false
90-
| DebuggerSettings.Builder().setDisplayCustomTags()| Boolean | Whether to display or not the custom tags in the log message if **bUseSingleTag** is set to **true**. <br/> **true** = custom tags will be displayed in the message if **bUseSingleTag** is true <br/> **false** = custom tags will not be displayed in the message if **bUseSingleTag** is true | false
91-
| DebuggerSettings.Builder().build() | N/A | Returns an instance of **DebuggerSettings** with the configurations from the **Builder** | N/A
84+
### DebugManager:
85+
86+
| Function | Params | Description |
87+
| -------- | ------ | ----------- |
88+
| init() | DebuggerSettings | This function initializes the DebugManager with a instance of **DebuggerSettings** to handle the behavior of the debug functionality.
89+
90+
### DebuggerSettings:
91+
92+
| Constructor | Description |
93+
| ----------- | ----------- |
94+
| (context: Context, bInDebugMode: Boolean) | Initializes an instance of **DebuggerSettings** with the context of your app and a variable to control whether the logs should be displayed or skipped <br/> **true** = Logs will be displayed <br/> **false** = Logs will not be displayed.
95+
96+
### DebuggerSettings.Builder:
97+
98+
| Constructor | Description |
99+
| ----------- | ----------- |
100+
| (context: Context, bInDebugMode: Boolean) | Initializes an instance of **DebuggerSettings** with the context of your app and a variable to control whether the logs should be displayed or skipped <br/> **true** = Logs will be displayed <br/> **false** = Logs will not be displayed.
101+
102+
| Function | Params | Description | Default |
103+
| -------- | ------ | ----------- | ------- |
104+
| setDefaultTag() | String | Default value for the **tag**, this value will be used if no tags are defined when calling the **Debug** functions or if the property **bUseSingleTag** is set to **true** | property 'android:label' inside the Manifest file.
105+
| setUseSingleTag() | Boolean | Default value for the **bUseSingleTag**. <br/> **true -> tag** will be used in all logs. <br/> **false -> tag** will only be used if custom tags are not defined when calling the **Debug** functions | false.
106+
| setDisplayCustomTags() | Boolean | Default value for the **bDisplayCustomTags**. <br/> **true ->** custom tags defined in **Debug** functions will be displayed before the log message but not as the log's TAG if **bUseSingleTag** is set to **false**. <br/> **false ->** custom tags will never be displayed before the message if **bUseSingleTag** is set to **true** | true.
107+
| build() | NONE | Returns an instance of **DebuggerSettings** with with the property values from the **Builder** | N/A.
108+
109+
### Debug:
110+
111+
| Constructor | Description |
112+
| ----------- | ----------- |
113+
| (message: String) | The log will contain this message and it's TAG will be the default value of the property **tag** in the **DebuggerSettings**.
114+
| (tag: Any, message: String) | The log will contain this message and it's TAG will be the name of the class passed in by the **tag** parameter if **bUseSingleTag** is set to **false**.
115+
| (tag: String, message: String) | The log's message will be the value from the **message** parameter and it's TAG will be the value from the **tag** parameter if **bUseSingleTag** is set to **false**.
116+
117+
| Function | Params | Description |
118+
| -------- | ------ | ----------- |
119+
| error() | NONE | Displays a log of type error.
120+
| warning() | NONE | Displays a log of type error.
121+
| information() | NONE | Displays a log of type information.
122+
| debug() | NONE | Displays a log of type debug.
123+
| verbose() | NONE | Displays a log of type verbose.
92124

93125
# Author
94126
- **Name:** Fernando Nunes

0 commit comments

Comments
 (0)