Specialized Logger

Additional

Language
N/A
Version
N/A
Created
Mar 6, 2017
Updated
Jul 23, 2018
Owner
Newtron Labs (NewtronLabs)
Contributor
Newtron Labs (NewtronLabs)
1
Activity
Badge
Generate
Download
Source code

Show card

Specialized Logger

Encrypted logging made great again.

Specialized Logger is an Android library that provides you flexibility and reliability when logging. It comes with a simple to use logger as well as an encrypted logger for commercial products.


In the build.gradle for your app.

dependencies {
    compileOnly 'com.newtronlabs.specializedlogger:specializedlogger:2.0.0'
}

Step 2

Simple Logging

Slog.d("Test", logMsg);

Throwable tr = new NullPointerException("Testing a null pointer exception!");
SLog.v("Test", logMsg, tr);

Encrpted Logging

// Example Cipher and Key.
DESKeySpec keySpec = new DESKeySpec("Your secret Key phrase".getBytes("UTF8"));
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey key = keyFactory.generateSecret(keySpec);\
Cipher cipher;
cipher = Cipher.getInstance("DES");

// Switch To Secure Logger
SLog.setLogger(new SecureLogger(cipher, key));
SLog.v("Test", "This is now encrypted!");