Residue Java Client
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 android project you will also need ResidueConnectTask.java
mkdir lib wget https://muflihun.github.io/downloads/bcprov-jdk15on-156.jar -O lib/bcprov-jdk15on-156.jar ## BouncyCastle wget https://muflihun.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
Compile & Running The Sample Application
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);
Copyright 2017-present Zuhd Web Services Copyright 2017-present @abumusamq https://github.com/zuhd-org/ https://muflihun.com https://zuhd.org 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.