--- title: "Android SDK v3" slug: "elsa2-sdk-androidv3" tags: ["elsa2", "sdk", "Android SDK v3", "로그 전송"] updated: 2026-09-17T09:23:53Z published: 2026-09-17T09:23:53Z canonical: "guide.ncloud-docs.com/elsa2-sdk-androidv3" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Android SDK v3 Available in Classic and VPC In Using Android SDK v3, it describes how to use Android SDK v3, which is provided by Effective Log Search & Analytics 2.0 service. The following describes how to use SDK. [1. Preparation](/docs/en/elsa2-sdk-androidv3#1%EC%82%AC%EC%A0%84%EC%A4%80%EB%B9%84) [2. Install SDK](/docs/en/elsa2-sdk-androidv3#2AndroidSDKv3%EC%84%A4%EC%B9%98) [3. Initialize SDK](/docs/en/elsa2-sdk-androidv3#3AndroidSDKv3%EC%B4%88%EA%B8%B0%ED%99%94) [4. Add permission for SDK](/docs/en/elsa2-sdk-androidv3#4AndroidSDKv3%EA%B6%8C%ED%95%9C%EC%B6%94%EA%B0%80) [5. Use SDK](/docs/en/elsa2-sdk-androidv3#5SDK%EC%82%AC%EC%9A%A9) ## 1. Preparation The following describes the preparations for installing Android SDK. 1. In NAVER Cloud Platform's console, [Create project](/docs/en/elsa2-project). 2. Check the txtToken value in [Project detail page](/docs/en/elsa2-project#%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EC%83%81%EC%84%B8%EC%A0%95%EB%B3%B4%ED%99%95%EC%9D%B8). 3. [Download](/docs/en/elsa2-sdk-download) Android SDK v3. ## 2. Install Android SDK v3 The following describes how to install Android SDK v3. 1. Unzip the downloaded SDK file. 2. Save the SDK file in the `libs` folder of the Android project where SDK is to be installed. - When using the Thrift protocol: save `nelo2-android-sdk-common-SDK버전명.jar` and `nelo2-android-sdk-thrift-SDK버전명.jar` files - When using the HTTPS protocol: save `nelo2-android-sdk-common-SDK버전명.jar` and `nelo2-android-sdk-https-SDK버전명.jar` files - Starting from NELO SDK 0.9.0, the library files to be added to the libs folder are different depending on the protocol. - ``` ..... android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } ..... repositories{ flatDir{ dirs 'libs' } } ..... dependencies { implementation (name: 'nelo2-android-sdk-common', version: '0.12.0', ext: 'aar') implementation (name: 'nelo2-android-sdk-https', version: '0.12.0', ext: 'aar') implementation (name: 'nelo2-android-sdk-thrift', version: '0.12.0', ext: 'aar') implementation (name: 'tink-android', version: '1.4.0', ext: 'jar') } ..... ``` ## 3. Initialize Android SDK v3 You can initialize Effective Log Search & Analytics 2.0 Android SDK in the following two ways. - Call init method at the Main Activity - Transfer logs without creating a crash dialog when an app crash occurs - ``` public class MainActivity extends Activity { ..... @Override protected void onCreate(Bundle savedInstanceState) { ..... NeloLog.init(getApplication(), "elsa-v2-col.ncloud.com", new HTTPSFactory(), "__Project_ID__", "__ProjectVersion__"); ..... } } ``` - Call init method at Application - @NeloConf Use along with the annotation - Export a crash dialog transferring the crash log following the settings when an app crash occurs - ``` @NeloConf( collectorUrl = "elsa-v2-col.ncloud.com", // Effective Log Search & Analytics Collector URL (required) protocolFactoryClass = ThriftFactory.class, // Effective Log Search & Analytics Protocol Type, you can choose to use ThriftFactory.class or HTTPSFactory.class (required) projectName = "72356c50401b8e20_testproject", // Effective Log Search & Analytics projectId (required) mode = CrashReportMode.DIALOG, // Effective Log Search & Analytics CrashReportMode (optional, Default : SLIENT) sendMode = NeloSendMode.ALL, // Effective Log Search & Analytics SendMode (optional, Default : ALL) debug = true, // Effective Log Search & Analytics Debug mode (optional, Default : false) logSource = "Effective Log Search & Analytics-android", // Effective Log Search & Analytics Log Source (optional, Default : nelo2-android) logType = "development", // Effective Log Search & Analytics Log Type (optional, Defalut : nelo2-log) resDialogText = R.string.crash_dialog_text, // Crash Report Doalog Text (required, if you set mode CrashReportMode.Dialog) resDialogTitle = R.string.crash_dialog_title // Crash Report Dolog Title (required, if you set mode CrashReportMode.Dialog) enableSendLogCatEvents = true, // Enable LogCat (optional, Default : false) enableSendLogCatMain = true, // Enable LogCat (optional, Default : false) enableSendLogCatRadio = true // Enable LogCat (optional, Default : false) ) public class MainApplication extends Application { ..... @Override protected void onCreate() { ..... NeloLog.init(this); ..... } } ..... ``` Note - For more information on initialization method, see [Initialization method](/docs/en/elsa2-sdk-androidv3#%EC%B4%88%EA%B8%B0%ED%99%94API). - Initialize by calling init method at Application is recommended. ## 4. Add permission for Android SDK v3 You need to add permission to import information, such as network status, device information, telecommunications company, and Logcat. Add the following content to the AndroidManifest.xml file. ``` ..... /** AndroidManifest.xml **/ ..... ..... ..... ..... ..... ``` ## 5. Use SDK Refer to the following actual codes that use Effective Log Search & Analytics 2.0 Android SDK and transfer logs to the projects. ``` ..... import com.navercorp.nelo2.android.NeloLog; ..... public class MainActivity extends Activity { ..... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); NeloLog.init(getApplication(),"Effective Log Search & Analytics-COLLECTOR-URL",new ThriftFactory(),"ELSA-PROJECT-NAME","PROJECT-VERSION"); NeloLog.debug("ErrorCode","Message","ErrorLocation"); // Send Debug Message NeloLog.info("ErrorCode","Message","ErrorLocation"); // Send Info Message NeloLog.warn("ErrorCode","Message","ErrorLocation"); // Send Warn Message NeloLog.error("ErrorCode","Message","ErrorLocation"); // Send Error Message NeloLog.fatal("ErrorCode","Message","ErrorLocation"); // Send Fatal Message String nullString = null; try{ nullString.toString(); }catch(Exception e){ NeloLog.crash(e,"ErrorCode","Message","ErrorLcoation"); // Send caught crash Message } NeloLog.debug("ErrorCode","Message","ErrorLocation"); // Send message with custom message int i = 10 / 0; // Nelo send uncaught exception } ..... ``` ## Android SDK v3 API details Android SDK v3 provides the following API. - [Initialization API](/docs/en/elsa2-sdk-androidv3#%EC%B4%88%EA%B8%B0%ED%99%94API) - [System Field setting API](/docs/en/elsa2-sdk-androidv3#SystemField%EC%84%A4%EC%A0%95API) - [Custom Field setting API](/docs/en/elsa2-sdk-androidv3#CustomField%EC%84%A4%EC%A0%95API) - [Logcat setting API](/docs/en/elsa2-sdk-androidv3#Logcat%EC%84%A4%EC%A0%95API) - [Logcat transferring API](/docs/en/elsa2-sdk-androidv3#Logcat%EC%A0%84%EC%86%A1API) - [Log transferring API](/docs/en/elsa2-sdk-androidv3#%EB%A1%9C%EA%B7%B8%EC%A0%84%EC%86%A1API) - [Log transferring API (including exceptions)](/docs/en/elsa2-sdk-androidv3#%EB%A1%9C%EA%B7%B8%EC%A0%84%EC%86%A1API%EC%98%88%EC%99%B8%ED%8F%AC%ED%95%A8) - [Crash callback API](/docs/en/elsa2-sdk-androidv3#%ED%81%AC%EB%9E%98%EC%8B%9C%EC%BD%9C%EB%B0%B1API) - [Option setting API](/docs/en/elsa2-sdk-androidv3#%EC%98%B5%EC%85%98%EC%84%A4%EC%A0%95API) ### Initialization API Android SDK v3 provides initialization method for each calling method. Note - You need to initialize NeloLog first before using NeloLog to make it work normally. Initialize only one time. - You need to initialize at Application to use Crash Report Dialog. #### Initialize at Main Activity Here are the APIs that should be initialized at Main Activity. ``` static boolean init(Application application, String reportServer, ProtocolFactory protocolFactory, String appId, String projectVersion) static boolean init(Application application, String reportServer, ProtocolFactory protocolFactory, String appId, String projectVersion, String userId) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `Application application` | Android's application information - Normally uses `getApplication()` | | `String reportServer` | Log collecting server's address - Thrift:elsa-col.ncloud.com - HTTPS: https://elsa-v2-col.ncloud.com/_store | | `ProtocolFacotry protocolFactory` | Connecting protocol of the log collecting server - Thrift: new ThriftFactory() - HTTPS: new HTTPSFactory | | `String appId` | Project key (refer to [Project details](/docs/en/elsa2-project#%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EC%83%81%EC%84%B8%EC%A0%95%EB%B3%B4%ED%99%95%EC%9D%B8)) | | `String appVersion` | Version information of the app to transfer logs | | `String userId` | User ID to transfer (optional) | ``` NeloLog.init(getApplication(), "elsa-v2-col.ncloud.com", new ThriftFactory(), "72356c50401b8e20_testproject", "1.0.0"); ``` #### Initialization at Application Here are the APIs that should be initialized at Application. You must enter the `@NeloConf` annotation together. ``` boolean init (Application application) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `Application application` | Android's application information. In general, enter `getApplication()` | ``` @NeloConf( collectorUrl = "elsa-v2-col.ncloud.com", // Effective Log Search & Analytics Collector URL (required) protocolFactoryClass = ThriftFactory.class, // Effective Log Search & Analytics Protocol Type, you can choose to use ThriftFactory.class or HTTPSFactory.class (required) projectName = "72356c50401b8e20_testproject", // Effective Log Search & Analytics projectId (required) mode = CrashReportMode.DIALOG, // Effective Log Search & Analytics CrashReportMode (optional, Default : SLIENT) sendMode = NeloSendMode.ALL, // Effective Log Search & Analytics SendMode (optional, Default : ALL) debug = true, // Effective Log Search & Analytics Debug mode (optional, Default : false) logSource = "Effective Log Search & Analytics-android", // Effective Log Search & Analytics Log Source (optional, Default : nelo2-android) logType = "development", // Effective Log Search & Analytics Log Type (optional, Defalut : nelo2-log) resDialogText = R.string.crash_dialog_text, // Crash Report Doalog Text (required, if you set mode CrashReportMode.Dialog) resDialogTitle = R.string.crash_dialog_title // Crash Report Dolog Title (required, if you set mode CrashReportMode.Dialog) enableSendLogCatEvents = true, // Enable LogCat (optional, Default : false) enableSendLogCatMain = true, // Enable LogCat (optional, Default : false) enableSendLogCatRadio = true // Enable LogCat (optional, Default : false) ) public class MainApplication extends Application { ..... @Override protected void onCreate() { ..... NeloLog.init(this); ..... } } ..... ``` ### System Field setting API Here are the APIs that set the System Field value. The value you set will be forwarded equally from all logs that will be transferred in the future. #### Set user ID Here are the APIs that set user ID. ``` static void void setUserID(String userID) static void setUserID(String instanceName, String userID) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String userID` | User ID | | `String instanceName` | Dynamic instance name | ``` NeloLog.setUserID("test"); ``` #### Set logSource information Here are the APIs that set logSource. ``` static void setLogSource(String logSource) static void setLogSource(String instanceName, String logSource) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String logSource` | logSource information | | `String instanceName` | Dynamic instance name | ``` NeloLog.setLogSource("NELO2 Android SDK LogSource"); ``` #### Set log type Here are the APIs that set logType. ``` static void setLogType(String logType) static void setLogType(String instanceName, String logType) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String logType` | logType information | | `String instanceName` | Dynamic instance name | ``` NeloLog.setLogType("NELO2 Android SDK LogType"); ``` ### Custom Field setting API Here are the APIs that set the Custom Field value. #### Set Custom Field's key and value Here are the APIs that set the Custom Field's key and value. The set value will be transferred as the same customized message in all logs to be sent in the future. ``` static void putCustomMessage(String key, String value) static void putCustomMessage(String instanceName, String key, String value) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String key` | Key of the value to save (field name) | | `String value` | Value of the value to be saved (user message) | | `String instanceName` | Dynamic instance name | ``` NeloLog.putCustomMessage("test","test value"); ``` #### Delete customized message Here are the APIs that delete the customized message that has the same key by deleting the Custom Field's key. ``` static void removeCustomMessage(String key) static void removeCustomMessage(String instanceName, String key) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String key` | Key of the value to delete (field name) | | `String instanceName` | Dynamic instance name | ``` NeloLog.removeCustomMessage("test"); ``` #### Delete all customized messages Here are the APIs that delete all customized messages. ``` static void clearCustomMessage() static void clearCustomMessage(String instanceName) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String instanceName` | Dynamic instance name | ``` NeloLog.clearCustomMessage(); ``` ### Logcat setting API Here are the APIs that set Logcat. Note - This API sets whether to transfer `LogCat buffer` when a crush occurs in the app. - The `LogCat buffer` types of Logcat are basically `Main`, `Radio`, and `Events`. ``` static void setEnableLogcatMain(boolean enabled) static void setEnableLogcatRadio(boolean enabled) static void setEnableLogcatEvents(boolean enabled) static void setEnableLogcatMain(String instanceName,boolean enabled) static void setEnableLogcatRadio(String instanceName,boolean enabled) static void setEnableLogcatEvents(String instanceName,boolean enabled) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `boolean enabled` | Set whether to transfer `Logcat buffer` | | `String instanceName` | Dynamic instance name | ``` NeloLog.setEnableLogcatMain(true); ``` ### Logcat transferring API Here are the APIs that transfer Logcat. Note - This function transfers `logcat buffer` to NELO at a certain time. - This function is not relevant to `setEnableLogcat` function. - This function is a heavy task. Try not to call repeatedly if possible (recommended). ``` static void sendLogcat(String errorCode, String message) static void sendLogcat(String errorCode, String message, String errorLocation) static void sendLogcatWithInstanceName(String instanceName, String errorCode, String message) static void sendLogcatWithInstanceName(String instanceName, String errorCode, String message, String errorLocation) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String errorCode` | The value that is mapped to NELO's `errorCode` field | | `String message` | The value that is mapped to NELO's `body` | | `String location` | Location where the log occurred | | `String instanceName` | Dynamic instance name | ``` NeloLog.sendLogcat("ErrorCode","Message"); ``` ### Log transferring API Here are the APIs that transfer logs. Note Uses functions by logLevel. - logLevel: Fatal, Error, Warn, Info, and Debug ``` static void debug(String errorCode,String message,String location) static void debug(String errorCode,String message) static void info(String errorCode,String message,String location) static void info(String errorCode,String message) static void warn(String errorCode,String message,String location) static void warn(String errorCode,String message) static void error(String errorCode,String message,String location) static void error(String errorCode,String message) static void fatal(String errorCode,String message,String location) static void fatal(String errorCode,String message) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `String errorCode` | The value that is mapped to NELO's `errorCode` field | | `String message` | The value that is mapped to NELO's `body` | | `String location` | Location where the log occurred | ``` NeloLog.error("test","Test value","location"); NeloLog.debug("test 2","Test value ") ``` ### Log transferring API (including exceptions) Here are the APIs that transfer logs including exception information. #### Transfer error logs Here are the APIs that transfer error logs including exception information. Note Uses functions by logLevel. - logLevel: Fatal, Error, Warn, Info, and Debug ``` static void debug(Throwable t, String errorCode,String message,String location) static void debug(Throwable t, String errorCode,String message) static void info(Throwable t, String errorCode,String message,String location) static void info(Throwable t, String errorCode,String message) static void warn(Throwable t, String errorCode,String message,String location) static void warn(Throwable t, String errorCode,String message) static void error(Throwable t, String errorCode,String message,String location) static void error(Throwable t, String errorCode,String message) static void fatal(Throwable t, String errorCode,String message,String location) static void fatal(Throwable t, String errorCode,String message) // For transferring dynamic instance logs static void debugWithInstanceName(String instanceName, Throwable t, String errorCode, String message) static void debugWithInstanceName(String instanceName, Throwable t, String errorCode, String message, String errorLocation) static void infoWithInstanceName(String instanceName, Throwable t, String errorCode, String message) static void infoWithInstanceName(String instanceName, Throwable t, String errorCode, String message, String errorLocation) static void warnWithInstanceName(String instanceName, Throwable t, String errorCode, String message) static void warnWithInstanceName(String instanceName, Throwable t, String errorCode, String message, String errorLocation) static void errorWithInstanceName(String instanceName, Throwable t, String errorCode, String message) static void errorWithInstanceName(String instanceName, Throwable t, String errorCode, String message, String errorLocation) static void fatalWithInstanceName(String instanceName, Throwable t, String errorCode, String message) static void fatalWithInstanceName(String instanceName, Throwable t, String errorCode, String message, String errorLocation) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `Throwable t` | Exception information - When setting `Throwable` information, a field named `Cause` is saved, and the `getCause()` value is saved | | `String errorCode` | The value that is mapped to NELO's `errorCode` field | | `String message` | The value that is mapped to NELO's `body` | | `String location` | Location where the log occurred - If the `location` information is not set, `Throwable` saves the location of the error at `location` | | `String instanceName` | Dynamic instance name | ``` try{ int a = 10 / 0; } catch (Exception e) { NeloLog.error(e,"Error_Code",e.getMessage()); } ``` #### Transfer crash logs Here are the APIs that transfer crash logs including exception information in exceptional instances. Note - As soon as the user calls the crash function, the crash log and `DmpData` field are transferred to NELO. - Call only when it is necessary for the app's performance (recommended). ``` static void crash(Throwable t, String errorCode,String message,String location) static void crash(Throwable t, String errorCode,String message) ``` ``` try{ int a = 10 / 0; } catch (Exception e) { NeloLog.crash(e,"Error_Code",e.getMessage()); } ``` ### Crash callback API You can call the user-defined functions before sending the crash log when a crash occurs. Here are the crash callback APIs. ``` static void setNeloCrashCallback(NeloCrashCallback neloCrashCallback) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `NeloCrashCallback neloCrashCallback` | Function called when a crash occurs - `boolean beforeSendNeloCrash()` - Determines whether to transfer the crash log as the return value - `boolean beforeInstanceSendNeloCrash(String instanceName)` (currently not supported) - When several instances are created and logs for certain instances are transferred, determine it as the return value by comparing it with the `instanceName` value - When it is initialized with the `NeloLog.init()`, set the name as `Nelo2Constants.NELO_DEFAULT_INSTANCE_NAME` - `void finishInstanceSendNeloCrash(String instanceName)` (currently not supported) - Calls when log transfer for certain instances is completed - `void finishSendNeloCrash()` - Calls when the entire crash transfer is completed | ``` NeloLog.setNeloCrashCallback(new NeloCrashCallback() { @Override public boolean beforeSendNeloCrash() { Log.e("[AndroidApp]", "______________[[ beforeSendNeloCrash ]]__________________"); return true; } @Override public boolean beforeInstanceSendNeloCrash(String instanceName) { Log.e("[AndroidApp]", "______________[[ beforeInstanceSendNeloCrash ] " + instanceName + "]__________________"); return Nelo2Constants.NELO_DEFAULT_INSTANCE_NAME.equalsIgnoreCase(instanceName); } @Override public void finishInstanceSendNeloCrash(String instanceName) { Log.e("[AndroidApp]", "______________[[ finishInstanceSendNeloCrash ] " + instanceName + "]__________________"); } @Override public void finishSendNeloCrash() { Log.e("[AndroidApp]", "______________[[ finishSendNeloCrash ]]__________________"); } }); ``` ### Option setting API Here are the Option setting APIs. #### Set whether to use NELO Here are the APIs that set whether to use NELO. ``` static boolean getNeloEnable() static void setNeloEnable(boolean enabled) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `boolean enabled` | Set whether to use NELO - If you set it as `false`, all log transfer and file saving features are ceased | #### Set whether to use the Debug mode When the Debug mode is used, detailed logs for Logcat are recorded. Here are the APIs that set whether to use Debug mode. ``` static boolean getDebug() static void setDebug(boolean enabled) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `boolean enabled` | Whether to use Debug mode - Set it as `true` only in a testing environment, and set it as `false` in the operating environment | #### Set crash transfer method Here are the APIs that set crash transfer method. ``` static CrashReportMode getCrashMode() static void setCrashMode(CrashReportMode mode) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `CrashReportMode mode` | Set crash transfer method when an app crash occurs - It is linked to the AndroidManifest.xml file's CrashReportDialog - `CrashReportMode.NONE`: does not transfer crash when an app crash occurs - `CrashReportMode.SLIENT`: does not notify the user when an app crash occurs and transfers the crash log - `CrashReportMode.DIALOG`: shows `Crash Report Dialog` to the user when an app crash occurs, and transfers crash only when the user approves - It is linked to the following items of the `@NeloConf`'s annotation - `resDialogTitle`: title of the `Crash Report Dialog`. String ID defined in `res/values/string.xml` - `resDialogText`: `Crash Report Dialog`'s description. String ID defined in `res/values/string.xml` | #### Set log transfer method Here are the APIs that set log transfer method. ``` static NeloSendMode getNeloSendMOde() static void setNeloSendMOde(NeloSendMode mode) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `NeloSendMode mode` | Set log transfer method | The following shows the log transfer method by network, depending on the parameter setting value. - `ALL` | Network status | Transfer method | | --- | --- | | 3g | Transfer | | Wi-Fi | Transfer | | Not Connected | Not transferred, saving file | - `ONLY_WIFI_WITH_FILE_SAVE` | Network status | Transfer method | | --- | --- | | 3g | Not transferred, saving file | | Wi-Fi | Transfer | | Not Connected | Not transferred, saving file | - `ONLY_WIFI_WITHOUT_FILE_SAVE` | Network status | Transfer method | | --- | --- | | 3g | Not transferred, not saving file | | Wi-Fi | Transfer | | Not Connected | Not transferred, not saving file | Note When setting `ONLY_WIFI_WITH_FILE_SAVE` or `ONLY_WIFI_WITHOUT_FILE_SAVE`, you need to add permission to check the network status. (Refer to [Add permission for Android SDK v3](/docs/en/elsa2-sdk-androidv3#4AndroidSDKv3%EA%B6%8C%ED%95%9C%EC%B6%94%EA%B0%80)) #### Set the maximum file size of the log save file Here are the APIs that set the maximum file size of the log save file. Note - Default of the maximum file size of the log save file is 1 MB (1024 x 1024 bytes). - When the log file's size is larger than the maximum value, it is saved after deleting old data. - For how to set logs to be saved as files, see [Set log transfer method](/docs/en/elsa2-sdk-androidv3#%EB%A1%9C%EA%B7%B8%EC%A0%84%EC%86%A1%EB%B0%A9%EB%B2%95%EC%84%A4%EC%A0%95). ``` static int getMaxFileSize() static void setMaxFileSize(int max_file_size) static int getMaxFileSize(String instanceName) static void setMaxFileSize(String instanceName, int max_file_size) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `int max_file_size` | The maximum file size of the log save file | | `String instanceName` | Dynamic instance name | #### Transfer logs saved in the queue and files to the server Here are the APIs that transfer logs temporarily saved in the queue and files to the server. ``` static void flush() ``` #### View the current size of the log save file Here are the APIs that view (return) the total size of the files used by the current NELO logs. ``` static long getAllNeloSaveLogFileSize() ``` #### Set whether to transfer previous files to the server Here are the APIs that set whether to read previous files and transfer them to the server. Note - Use the file name created with a hash value by combining `InstanceName` and the project name. - Call this function when you have to delete existing files because the project name and instance name have changed. - When the `flushFile` value is `true` (default value), read all the content before deleting the previous files and save them in the queue. ``` static boolean clearSavedNeloLogFile(boolean flushFile) ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `boolean flushFile` | Determines whether to read previous files and transfer them to the server | #### Set loglevel Here are the APIs that transfer logs over the loglevel. Note - The default is `Nelo2LogLevel.DEBUG`. - When the user makes requests to transfer logs to the server explicitly, such as `crash` or `flush`, ignore `LogLevel`'s filter value. ``` static void setLogLevelFilter(Nelo2LogLevel loglevel) static Nelo2LogLevel getLogLevelFilter() ``` The following describes each parameter. | Parameter | Description | | --- | --- | | `Nelo2LogLevel loglevel` | Transfers logs over `loglevel` to NELO |