You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Brings over the necessary engine changes for embedding UE4 mobile as a dylib/so in native mobile app - Various changes for facial animation, screen recording, others - ARKit and ARCore plugins were removed, as deemed "not ready" #rb many people #ROBOMERGE-OWNER: ben.marsh #ROBOMERGE-AUTHOR: josh.adams #ROBOMERGE-SOURCE: CL 5201138 via CL 5203024 via CL 5226277 #ROBOMERGE-BOT: BUILD (Main -> Dev-Build) [CL 5243833 by josh adams in Dev-Build branch]
95 lines
1.6 KiB
Java
95 lines
1.6 KiB
Java
package com.epicgames.ue4;
|
|
|
|
import android.util.Log;
|
|
|
|
public class Logger
|
|
{
|
|
public interface ILoggerCallback
|
|
{
|
|
void LoggerCallback(String Level, String Tag, String Message);
|
|
}
|
|
|
|
private static ILoggerCallback mCallback = null;
|
|
private String mTag;
|
|
|
|
private static boolean bAllowLogging = true;
|
|
@SuppressWarnings({"FieldCanBeLocal", "unused"})
|
|
private static boolean bAllowExceptionLogging = true;
|
|
|
|
@SuppressWarnings("unused")
|
|
public static void RegisterCallback(ILoggerCallback callback)
|
|
{
|
|
mCallback = callback;
|
|
}
|
|
|
|
@SuppressWarnings("WeakerAccess")
|
|
public static void SuppressLogs ()
|
|
{
|
|
bAllowLogging = bAllowExceptionLogging = false;
|
|
}
|
|
|
|
public Logger(String Tag)
|
|
{
|
|
mTag = Tag;
|
|
}
|
|
|
|
public void verbose(String Message)
|
|
{
|
|
if (bAllowLogging)
|
|
{
|
|
Log.v(mTag, Message);
|
|
}
|
|
if (mCallback != null)
|
|
{
|
|
mCallback.LoggerCallback("V/", mTag, Message);
|
|
}
|
|
}
|
|
|
|
public void debug(String Message)
|
|
{
|
|
if (bAllowLogging)
|
|
{
|
|
Log.d(mTag, Message);
|
|
}
|
|
if (mCallback != null)
|
|
{
|
|
mCallback.LoggerCallback("D/", mTag, Message);
|
|
}
|
|
}
|
|
|
|
public void warn(String Message)
|
|
{
|
|
if (bAllowLogging)
|
|
{
|
|
Log.w(mTag, Message);
|
|
}
|
|
if (mCallback != null)
|
|
{
|
|
mCallback.LoggerCallback("W/", mTag, Message);
|
|
}
|
|
}
|
|
|
|
public void error(String Message)
|
|
{
|
|
if (bAllowLogging)
|
|
{
|
|
Log.e(mTag, Message);
|
|
}
|
|
if (mCallback != null)
|
|
{
|
|
mCallback.LoggerCallback("E/", mTag, Message);
|
|
}
|
|
}
|
|
|
|
public void error(String Message, Throwable Throwable)
|
|
{
|
|
if (bAllowLogging)
|
|
{
|
|
Log.e(mTag, Message, Throwable);
|
|
}
|
|
if (mCallback != null)
|
|
{
|
|
mCallback.LoggerCallback("E/", mTag, Message);
|
|
}
|
|
}
|
|
} |