Make Your Logs Work for You

The days of logging in to servers and manually viewing log files are over. SolarWinds® Papertrail™ aggregates logs from applications, devices, and platforms to a central location.

View Technology Info

FEATURED TECHNOLOGY

Troubleshoot Fast and Enjoy It

SolarWinds® Papertrail™ provides cloud-based log management that seamlessly aggregates logs from applications, servers, network devices, services, platforms, and much more.

View Capabilities Info

FEATURED CAPABILITIES

Aggregate and Search Any Log

SolarWinds® Papertrail™ provides lightning-fast search, live tail, flexible system groups, team-wide access, and integration with popular communications platforms like PagerDuty and Slack to help you quickly track down customer problems, debug app requests, or troubleshoot slow database queries.

View Languages Info

FEATURED LANGUAGES

TBD - APM Integration Title

TBD - APM Integration Description

TBD Link

APM Integration Feature List

TBD - Built for Collaboration Title

TBD - Built for Collaboration Description

TBD Link

Built for Collaboration Feature List

Collect Logs: Apps & Services > Android

Android

Papertrail can accept logs from any Android application using either of the following methods.

logback-syslog4j

  • Add the following to the app’s Gradle dependencies list:
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'com.github.tony19:logback-android:1.1.1-12'
compile ('com.papertrailapp:logback-syslog4j:1.0.0') {
    exclude group: 'ch.qos.logback'
}
  • Update your logback syslog configuration file with the text below, replacing logsN and XXXXX with the URL and port for your log destination found in Log Destinations in Papertrail. YOUR_APP will appear as the program name in the event viewer; replace this with your desired app name.
<configuration> 
  <appender name="syslog-tls" class="com.papertrailapp.logback.Syslog4jAppender"> 
    <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%d{MMM dd HH:mm:ss} Android YOUR_APP: %-5level %logger{35} %m%n</pattern>
    </layout>
    <syslogConfig class="org.productivity.java.syslog4j.impl.net.tcp.ssl.SSLTCPNetSyslogConfig"> 
      <host>logsN.papertrailapp.com</host> 
      <port>XXXXX</port> 
      <sendLocalName>false</sendLocalName>
      <sendLocalTimestamp>false</sendLocalTimestamp> 
      <maxMessageLength>128000</maxMessageLength> 
    </syslogConfig> 
  </appender>
  <appender name="async" class="ch.qos.logback.classic.AsyncAppender"> 
    <appender-ref ref="syslog-tls" /> 
  </appender>
  <root level="INFO"> 
    <appender-ref ref="async" /> 
  </root> 
</configuration>

ProGuard

When using ProGuard with minifyEnabled true, add this to proguard-rules.pro:

-keep class org.productivity.java.syslog4j.** { *; }

Otherwise, ProGuard removes the Syslog4j classes, resulting in a runtime error:

java.lang.ClassNotFoundException: Didn't find class "org.productivity.java.syslog4j.impl.net.tcp.ssl.SSLTCPNetSyslogConfig"

logback-android

Use logback-android and then follow Papertrail’s typical logback setup.

The article Logging from iOS and macOS apps has a few tips for making the most of Papertrail for logs from mobile devices.

Other methods

If neither logback-syslog4j or logback-android are suitable for your app:

  • For Flutter users, the community created a plugin to send logs directly to Papertrail.
  • Look at Logging from iOS and macOS apps for additional language-independent logging methods, like simply sending UDP syslog packets to Papertrail.
  • Let us know. We can usually come up with something and we enjoy the chance.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.