Browse Source

Report levels V and D no longer logged in FireBase. Updated CONTRIBUTING.md

pull/24/head
Ezerous 8 years ago
parent
commit
20277c6878
  1. 32
      CONTRIBUTING.md
  2. 6
      app/src/release/java/mthmmy.utils/Report.java

32
CONTRIBUTING.md

@ -15,47 +15,33 @@ There are many ways of contributing to mTHMMY:
- Simply using the latest release version - Simply using the latest release version
- Joining our [Discord server][discord-server] - Joining our [Discord server][discord-server]
- Creating issues & joining discussions on our [Issue Tracker][issue-tracker] - Submiting bugs and ideas on our [Trello board][trello-board]
- Getting code access to fork mTHMMY and submit [merge requests](#merge-requests) - Getting code access to fork mTHMMY and submit [merge requests](#merge-requests)
- Joining our core team - Joining our core team
- Contacting us by email at `thmmynolife@gmail.com` - Contacting us by email at `thmmynolife@gmail.com`
## Issue tracker ## Issue tracker
The [mTHMMY issue tracker on GitLab.com][issue-tracker] is for [bugs](#bugs) concerning the latest mTHMMY release and [improvements](#improvements). The [mTHMMY Board on trello.com][trello-board] is used as an Issue Tracker, for bugs and improvements concerning the available mTHMMY releases.
Before creating a card to submit an issue please **[search the board][trello-board]** for similar entries.
Before submitting an issue please **[search the issue tracker][issue-tracker]** for similar entries and if you don't find any create your own conforming to the simple issue submission guidelines listed below.
### Bugs
Please submit bugs using the ['Bug' issue template](.gitlab/issue_templates/Bug.md) provided on the issue tracker and the [`Bug`](https://gitlab.com/thmmy.gr/mTHMMY/issues?label_name=Bug) label.
### Improvements
Please submit improvements/ feature proposals using the ['Improvement' issue template](.gitlab/issue_templates/Improvement.md) provided on the issue tracker and the [`Improvement`](https://gitlab.com/thmmy.gr/mTHMMY/issues?label_name=Improvement) label.
### Issue weight
Issue weight represents the amount of work required for an issue, as an abstract measurement of its complexity. You are encouraged to discuss and set the weight of any issue to what makes most sense.
For example, something that has a weight of 1 (or no weight) is really small and simple.
Something that is 9 is a very complex issue requiring to (re)write big parts of code.
## Merge requests ## Merge requests
Merge requests with fixes and improvements to mTHMMY are most welcome. The simple workflow to make a merge request is as follows: Merge requests with fixes and improvements to mTHMMY are most welcome. Any developer that wants to work independently from the core team can simply
follow the workflow below to make a merge request:
1. Request and get access to the repository
1. Fork the project into your personal space on GitLab.com 1. Fork the project into your personal space on GitLab.com
1. Create a feature branch, branch away from `master` 1. Create a feature branch, branch away from `develop`
1. Push the commit(s) to your fork 1. Push the commit(s) to your fork
1. Create a merge request (MR) targeting `master` [at mTHMMY](https://gitlab.com/thmmy.gr/mTHMMY/tree/master) 1. Create a merge request (MR) targeting `develop` [at mTHMMY](https://gitlab.com/ThmmyNoLife/mTHMMY/tree/develop)
1. Fill the MR title describing the change you want to make 1. Fill the MR title describing the change you want to make
1. Fill the MR description with a brief motive for your change and the method you used to achieve it. 1. Fill the MR description with a brief motive for your change and the method you used to achieve it.
1. Submit the MR. 1. Submit the MR.
*This guide was inspired by [Gitlab CE's Contributing Guide][gitlab-contributing-guide].*
[issue-tracker]: https://gitlab.com/thmmy.gr/mTHMMY/issues [trello-board]: https://trello.com/invite/b/4MVlkrkg/44a931707bd0b84a5e0bdfc42b9ae4f1/mthmmy
[discord-server]: https://discord.gg/CVt3yrn [discord-server]: https://discord.gg/CVt3yrn
[gitlab-contributing-guide]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md [gitlab-contributing-guide]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md

6
app/src/release/java/mthmmy.utils/Report.java

@ -68,18 +68,24 @@ public class Report
} }
private static void log(String level, String TAG, String message) private static void log(String level, String TAG, String message)
{
if(!level.equals("V")&&!level.equals("D")) //don't log V and D levels
{ {
FirebaseCrash.log(level + "/" + TAG + ": " + message); FirebaseCrash.log(level + "/" + TAG + ": " + message);
if(level.equals("E")||level.equals("WTF")) //report only serious exceptions if(level.equals("E")||level.equals("WTF")) //report only serious exceptions
FirebaseCrash.report(new UnknownException("UnknownException")); FirebaseCrash.report(new UnknownException("UnknownException"));
} }
}
private static void exception(String level, String TAG, String message, Throwable tr) private static void exception(String level, String TAG, String message, Throwable tr)
{
if(!level.equals("V")&&!level.equals("D")) //don't log V and D levels
{ {
FirebaseCrash.log(level + "/" + TAG + ": " + message + ": " + tr.getMessage()); FirebaseCrash.log(level + "/" + TAG + ": " + message + ": " + tr.getMessage());
if(level.equals("E")||level.equals("WTF")) //report only serious exceptions if(level.equals("E")||level.equals("WTF")) //report only serious exceptions
FirebaseCrash.report(tr); FirebaseCrash.report(tr);
} }
}
/** /**
* Does nothing in release. * Does nothing in release.

Loading…
Cancel
Save