﷽
This library provides you interface to connect to the residue seamlessly and use it as your central logging library.
Please note, until first stable release we are not providing JAR file for this library. Please feel free to import the relevant code in to your library.
For regular java project you will need Residue.java and Base64.java
For android project you will also need ResidueConnectTask.java
- BouncyCastle 1.56+
- Gson v2.6.2+
- API level 26 for Android
mkdir lib
wget https://abumq.github.io/downloads/bcprov-jdk15on-156.jar -O lib/bcprov-jdk15on-156.jar ## BouncyCastle
wget https://abumq.github.io/downloads/gson-2.6.2.jar -O lib/gson-2.6.2.jar ## GSON
You may be interested in Unlimited Strength Jurisdiction Policy Files for higher security and ability to use AES-256 cryptography. Please make sure you read the policy statement.
You can download it from here and make sure you unzip these files to <java-home>/jre/lib/security
(please make backups as required).
- BouncyCastle: https://www.bouncycastle.org/download/bcprov-jdk15on-156.jar
- GSON: https://repo1.maven.org/maven2/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar
- JCE Policy Files 6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
- JCE Policy Files 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
- JCE Policy Files 8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
All the following commands should be run from the root directory.
mkdir bin
sh compile-lib.sh
sh compile-and-run-sample.sh
Residue r = Residue.getInstance();
r.loadConfigurations("config.json");
r.reconnect();
Residue.Logger logger = Residue.getInstance().getLogger("default");
logger.info("info log");
logger.verbose(3, "verbose level 3 log");
// you can set System.out print stream
Residue.getInstance().setDefaultLoggerId("sample-app");
System.setOut(Residue.getInstance().getPrintStream());
// all of these calls will send to residue
System.out.println("this is %s", "message");
System.out.println(true);
Check out simple sample or Android sample
Copyright 2017-present @abumq (Majid Q.)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.