/

Logger SDK Installation

Before you begin

You'll need:

  • A ByteHide account and project token
  • Java 8+ for server-side applications
  • Android API 21+ for mobile applications

Installation Options

Add the ByteHide Logger SDK to your project using one of these methods:

Maven

XML
<dependency>
    <groupId>com.bytehide</groupId>
    <artifactId>bytehide-logs</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

GRADLE
implementation 'com.bytehide:bytehide-logs:1.0.0'

Gradle (Kotlin DSL)

Kotlin
implementation("com.bytehide:bytehide-logs:1.0.0")

Basic Integration Example

Java
import com.bytehide.logs.core.Log;

// Set your project token
Log.setProjectToken("your-project-token");

// Enable console output
Log.setConsoleEnabled(true);

// Start logging
Log.info("Application started successfully!");

Verify Installation

After installing the SDK, you can verify it's working by logging a test message:

Java
import com.bytehide.logs.core.Log;
import com.bytehide.logs.models.LogLevel;

// Configure the logger
Log.setProjectToken("your-project-token");
Log.setConsoleEnabled(true);
Log.setMinimumLevel(LogLevel.DEBUG);

try {
    // Test logging
    Log.info("ByteHide Logger initialized successfully!");
    Log.debug("Debug message - visible with debug level");
    Log.warn("Warning message");
    Log.error("Error message for testing");
    
    System.out.println("Logger is working correctly!");
} catch (Exception e) {
    System.err.println("Error initializing logger: " + e.getMessage());
}

Runtime Compatibility

ByteHide Logger is compatible with:

Java Environments

  • Java 8+: Full logging capabilities including file persistence
  • Android API 21+: Full support with Logcat integration

Build Tools

  • Maven: Standard dependency management
  • Gradle: Groovy and Kotlin DSL support

Framework Compatibility

  • Spring Boot: Enterprise Java applications
  • Android: Mobile applications with Logcat support
  • Micronaut: Lightweight microservices
  • Quarkus: Cloud-native Java applications

Android Setup

For Android applications, add the dependency and required permissions:

Add Dependency

GRADLE
dependencies {
    implementation 'com.bytehide:bytehide-logs:1.0.0'
}

Required Permissions

Add to AndroidManifest.xml:

XML
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Android Usage

Java
// In Application class or Activity
Log.setProjectToken("your-token");
Log.setConsoleEnabled(true); // Uses Logcat
Log.info("App started");

Next Steps

Previous
Create a project