- Print
- PDF
FAQ
- Print
- PDF
Available in Classic and VPC
The FAQ can quickly answer common questions. If your questions are not resolved in the FAQ, see the user guides to find the information you want. Effective Log Search & Analytics 2.0 FAQ consists of the following topics.
Android SDK v1/v2/v3
iOS SDK
log4j/logback/log4j2 SDK v2
Android SDK v1/v2/v3
The following covers frequently asked questions and answers related to Android SDK v1/v2/v3.
Q. How can I transfer all the logs saved in the file when a crash occurs to the Effective Log Search & Analytics 2.0 server?
A. Call NeloLog.flush()
in the finishSendNeloCrash()
function among the crash callback functions. All the logs in the file and queue when a crash occurs are transferred to the server.
Q. The New User install App
log that I have not transferred is transferred.
A. The New User install App
log is transferred only one time when the application is initially installed.
Q. Is there any caution when applying the proguard?
A. When applying the proguard, if you also obfuscate ThriftConnector
and HttpsConnector
, log transfer fails because it cannot find the corresponding class. Exclude those classes when applying the proguard.
Q. The "Could not find class 'com.nhncorp.nelo2.android.HttpsConnector', referenced from method com.nhncorp.nelo2.android.Nelo2ConnectorFactory.getConnector" error occurs.
A. It is a warning message that appears when the necessary files for using HTTPS protocol are not added while installing SDK. If you use Thrift protocol only, you can ignore it.
iOS SDK
The following covers frequently asked questions and answers related to iOS SDK.
Q. Where can I download bitcode-enabled app's dSYMs(Symbol)
?
A. You can download it from Xcode or iTunes Connect.
- To download
dSYM
file from iTunes Connect, select the version you want from the app build list in the My Apps menu and click Download dSYM.
log4j/logback/log4j2 SDK v2
The following covers frequently asked questions and answers related to log4j/logback/log4j2 SDK v2.
Common
The following are questions and answers applicable to log4j/logback/log4j2 in common.
Q. How can I use AsyncAppender in a batch program or a simple test program?
A. Add a code to wait for a few seconds at the end of the program as follows:
try {
Thread.sleep(3000L);
} catch (InterruptedException ignore){}
AsyncAppender transfers logs asynchronously through a separate demon thread that records logs. As the main thread ends immediately in a batch program of Java, the batch application and JVM end before a demon thread of log4jAsyncAppender is created and transfers logs. Therefore, add a waiting code at the end of a program to give some time to transfer all logs before ending the program.
Q. How can I include Java stack trace in log4j/logback?
A. In Action / BO / DAO / Java batch program, etc., use it in log.error(e.getMessage(), e);
form to export the stack trace using log4j/logback.
- As SLF4J Logger is an argument of method, the logging method that only receives
Throwable
is not supported.String[] aa = null; try { aa[0] = "111"; } catch (NullPointerException e) { // log.error(e); //Method not supported in SLF4J. log.error(e.getMessage(), e); ///stacktrace export }
Q. How can I minimize the performance degradation due to log4j/logback/log4j2 logging?
A. You can maximize filtering by using name
and level
in each logger settings of log4j.xml
, logback.xml
, and log4j2.xml
.
- If you set
com
ororg
at theDEBUG
level in the logger settings, the performance degrades as lots ofILoggingEvent(log4j)
/ILoggingEvent(logback)
/ILoggingEvent(log4j2)
are unnecessarily created in the logger. - Although logs are not actually transferred because the Threshold is set to
ERROR
in nelo log4j appender, LoggingEvent is created in the logger and transferred to appender anyway. - Example in case of log4j
- Settings that degrade performance (Use only for developing)
<!-- Logger --> <logger name="com" additivity="false"> <level value="debug"/> <appender-ref ref="STDOUT" /> <appender-ref ref="nelo-log4j" /> </logger> <!-- Logger --> <logger name="org" additivity="false"> <level value="debug"/> <appender-ref ref="STDOUT" /> <appender-ref ref="nelo-log4j" /> </logger> <!-- Root Logger --> <root level="warn"> <appender-ref ref="STDOUT" /> <appender-ref ref="nelo-log4j" /> </root>
- Settings that consider performance (Use for operation)
<!-- Logger --> <logger name="com" additivity="false"> <level value="error"/> <appender-ref ref="STDOUT" /> <appender-ref ref="nelo-log4j" /> </logger> <!-- Root Logger --> <root level="warn"> <appender-ref ref="STDOUT" /> <appender-ref ref="nelo-log4j" /> </root>
- Settings that degrade performance (Use only for developing)
Q. When transferring a thrift bulk, a timeout occurs.
A. When logs are not transferred to the collecting server normally, the following log appears. In this case, increase timeout
value and decrease bulkSize
in the xml appender settings to reduce the data included in a packet.
[NELO2] sendMessage (1426319665440) sendBulk failed.. Error occur : java.net.SocketTimeoutException: Read timed out
log4j/logback
The following are questions and answers applicable to log4j and logback.
Q. When using them in WAS, how can I end WAS stably?
A. WAS sometimes may not end stably when WAS(including Tomcat) ends while the error log is being transferred. To end WAS stably, call stop()
method for the LoggerContext
instance to close nelo2 java appender when ending WAS.
While org.springframework.web.util.Log4jConfigListener is provided for log4j in Spring, Listener is not provided for logback. As for logback, Nelo2 logback SDK provides LogbackShutdownListener by itself.
logback
The following are questions and answers applicable to logback.
Q. httpClient's logging-related message appears.
A. When using HTTP protocol, the following log occurs when the application starts.
This is because httpClient
library uses apache logging framework, and the logs created from here are left in root logger
.
SLF4J: The following loggers will not work because they were created
SLF4J: during the default configuration phase of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: org.apache.http.impl.conn.PoolingClientConnectionManager
SLF4J: org.apache.http.impl.conn.DefaultClientConnectionOperator
SLF4J: org.apache.http.impl.client.DefaultHttpClient