Gamebase SDK for Android  2.39.0
NHN Cloud Gamebase Platform
Gamebase.Logger Class Reference
Collaboration diagram for Gamebase.Logger:
Collaboration graph

Static Public Member Functions

static void initialize (@NonNull final Context context, @NonNull final LoggerConfiguration configuration)
 Initialize TOAST Logger SDK
TOAST Logger SDK sends a log to Log & Crash Server for analyzing the data. More...
 
static void initialize (@NonNull final Context context, @NonNull final GamebaseCallback callback)
 Initialize TOAST Logger SDK with the key value defined in string resource. More...
 
static void debug (@NonNull final String message)
 Send a log to Log & Crash Server for analyzing the string message with debug level. More...
 
static void info (@NonNull final String message)
 Send a log to Log & Crash Server for analyzing the string message with info level. More...
 
static void warn (@NonNull final String message)
 Send a log to Log & Crash Server for analyzing the string message with warn level. More...
 
static void error (@NonNull final String message)
 Send a log to Log & Crash Server for analyzing the string message with error level. More...
 
static void fatal (@NonNull final String message)
 Send a log to Log & Crash Server for analyzing the string message with fatal level. More...
 
static void debug (@NonNull final String format, @NonNull final Object... args)
 Send a log to Log & Crash Server for analyzing the string message with debug level. More...
 
static void info (@NonNull final String format, @NonNull final Object... args)
 Send a log to Log & Crash Server for analyzing the string message with info level. More...
 
static void warn (@NonNull final String format, @NonNull final Object... args)
 Send a log to Log & Crash Server for analyzing the string message with warn level. More...
 
static void error (@NonNull final String format, @NonNull final Object... args)
 Send a log to Log & Crash Server for analyzing the string message with error level. More...
 
static void fatal (@NonNull final String format, @NonNull final Object... args)
 Send a log to Log & Crash Server for analyzing the string message with fatal level. More...
 
static void debug (@NonNull final String message, @NonNull final Map< String, String > userFields)
 Send a log to Log & Crash Server for analyzing the string message with debug level. More...
 
static void info (@NonNull final String message, @NonNull final Map< String, String > userFields)
 Send a log to Log & Crash Server for analyzing the string message with info level. More...
 
static void warn (@NonNull final String message, @NonNull final Map< String, String > userFields)
 Send a log to Log & Crash Server for analyzing the string message with warn level. More...
 
static void error (@NonNull final String message, @NonNull final Map< String, String > userFields)
 Send a log to Log & Crash Server for analyzing the string message with error level. More...
 
static void fatal (@NonNull final String message, @NonNull final Map< String, String > userFields)
 Send a log to Log & Crash Server for analyzing the string message with fatal level. More...
 
static void setUserField (@NonNull final String field, @NonNull final Object value)
 Used to predefine additional information. More...
 
static void setLoggerListener (@NonNull final LoggerListener listener)
 You can be notified of the result of the log transfer through this listener. More...
 

Member Function Documentation

◆ debug() [1/3]

static void debug ( @NonNull final String  format,
@NonNull final Object...  args 
)
static

Send a log to Log & Crash Server for analyzing the string message with debug level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
formatString format to send to the Log & Crash server.
argsArguments that make up the string format.

◆ debug() [2/3]

static void debug ( @NonNull final String  message)
static

Send a log to Log & Crash Server for analyzing the string message with debug level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.

◆ debug() [3/3]

static void debug ( @NonNull final String  message,
@NonNull final Map< String, String >  userFields 
)
static

Send a log to Log & Crash Server for analyzing the string message with debug level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.
userFieldsAdditional information you want to send Log & Crash server together.

◆ error() [1/3]

static void error ( @NonNull final String  format,
@NonNull final Object...  args 
)
static

Send a log to Log & Crash Server for analyzing the string message with error level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
formatString format to send to the Log & Crash server.
argsArguments that make up the string format.

◆ error() [2/3]

static void error ( @NonNull final String  message)
static

Send a log to Log & Crash Server for analyzing the string message with error level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.

◆ error() [3/3]

static void error ( @NonNull final String  message,
@NonNull final Map< String, String >  userFields 
)
static

Send a log to Log & Crash Server for analyzing the string message with error level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.
userFieldsAdditional information you want to send Log & Crash server together.

◆ fatal() [1/3]

static void fatal ( @NonNull final String  format,
@NonNull final Object...  args 
)
static

Send a log to Log & Crash Server for analyzing the string message with fatal level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
formatString format to send to the Log & Crash server.
argsArguments that make up the string format.

◆ fatal() [2/3]

static void fatal ( @NonNull final String  message)
static

Send a log to Log & Crash Server for analyzing the string message with fatal level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.

◆ fatal() [3/3]

static void fatal ( @NonNull final String  message,
@NonNull final Map< String, String >  userFields 
)
static

Send a log to Log & Crash Server for analyzing the string message with fatal level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.
userFieldsAdditional information you want to send Log & Crash server together.

◆ info() [1/3]

static void info ( @NonNull final String  format,
@NonNull final Object...  args 
)
static

Send a log to Log & Crash Server for analyzing the string message with info level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
formatString format to send to the Log & Crash server.
argsArguments that make up the string format.

◆ info() [2/3]

static void info ( @NonNull final String  message)
static

Send a log to Log & Crash Server for analyzing the string message with info level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.

◆ info() [3/3]

static void info ( @NonNull final String  message,
@NonNull final Map< String, String >  userFields 
)
static

Send a log to Log & Crash Server for analyzing the string message with info level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.
userFieldsAdditional information you want to send Log & Crash server together.

◆ initialize() [1/2]

static void initialize ( @NonNull final Context  context,
@NonNull final GamebaseCallback  callback 
)
static

Initialize TOAST Logger SDK with the key value defined in string resource.


TOAST Logger SDK sends a log to Log & Crash Server for analyzing the data.
The appKey of the Log & Crash project is required to initialize TOAST Logger SDK. This function gets the appKey from the string resource 'gamebase_toast_logger_app_key'.
You must include the resource file defined in the apk as shown below.
Required : <string name="gamebase_toast_logger_app_key">YOUR_LOG_AND_CRASH_APP_KEY</string>
Optional : <string name="gamebase_toast_logger_enable_crash_reporter">true or false</string>

Since
Added 2.6.0.
Deprecated:
As of release 2.9.0, You don't need to call this API anymore. This API is called by the GamebaseInitProvider automatically.
Parameters
contextThe context to use. Usually your android.app.Application
or android.app.Activity object.
callbackInitialization result callback, returns the result of initialization.

◆ initialize() [2/2]

static void initialize ( @NonNull final Context  context,
@NonNull final LoggerConfiguration  configuration 
)
static

Initialize TOAST Logger SDK
TOAST Logger SDK sends a log to Log & Crash Server for analyzing the data.

If you define meta-data in AndroidManifest.xml, you don't need to call this API. <meta-data android:name="gamebase_toast_logger_app_key" android:value="YOUR_LOG_AND_CRASH_APP_KEY"/> <meta-data android:name="gamebase_toast_logger_enable_crash_reporter" android:value="true or false"/>

Or you can add string resource like this. <string name="gamebase_toast_logger_app_key">YOUR_LOG_AND_CRASH_APP_KEY</string>
<string name="gamebase_toast_logger_enable_crash_reporter">true or false</string>

Since
Added 2.6.0.
Parameters
contextThe context to use. Usually your android.app.Application
or android.app.Activity object.
configurationThe appKey of the Log & Crash project must be set in this parameter.

◆ setLoggerListener()

static void setLoggerListener ( @NonNull final LoggerListener  listener)
static

You can be notified of the result of the log transfer through this listener.

Since
Added 2.6.0.
Parameters
listenerThe listener that is notified of the results of the log transfer.

◆ setUserField()

static void setUserField ( @NonNull final String  field,
@NonNull final Object  value 
)
static

Used to predefine additional information.


The value set here is sent together without being set every time.

Since
Added 2.6.0.
Parameters
fieldThe key of the additional information.
valueThe value of the additional information.

◆ warn() [1/3]

static void warn ( @NonNull final String  format,
@NonNull final Object...  args 
)
static

Send a log to Log & Crash Server for analyzing the string message with warn level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
formatString format to send to the Log & Crash server.
argsArguments that make up the string format.

◆ warn() [2/3]

static void warn ( @NonNull final String  message)
static

Send a log to Log & Crash Server for analyzing the string message with warn level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.

◆ warn() [3/3]

static void warn ( @NonNull final String  message,
@NonNull final Map< String, String >  userFields 
)
static

Send a log to Log & Crash Server for analyzing the string message with warn level.


The levels are as follows: debug < info < warn < error < fatal
Log & Crash Search allows fast and patterned search of any logs you want among a large volume.

Since
Added 2.6.0.
Parameters
messageLog messages to send to the Log & Crash server.
userFieldsAdditional information you want to send Log & Crash server together.