flogged 1.0.1 copy "flogged: ^1.0.1" to clipboard
flogged: ^1.0.1 copied to clipboard

Log to Logstash from Flutter applications using lumberdash

Flogged #

A logger for Lumberdash which sends logs to a Logstash instance.

Installation and Setup #

  1. Include the package as a Git dependency:
dependencies:
  # ...
  lumberdash: ^2.1.1 # Required for Flogged to work
  flogged:
    git: git@github.com:netsells/flogged
  1. Set up your AndroidManifest.xml file by adding the following to the application tag:
android:usesCleartextTraffic="true"
  1. Add the following to your Info.plist file, being sure to replace example entries:
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>my.logstash.instance</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSIncludesSubdomains</key>
            <true/>
        </dict>
    </dict>
</dict>
  1. In main.dart, before calling runApp, add these lines, replacing example content:
WidgetsFlutterBinding.ensureInitialized();
putLumberdashToWork(withClients: [
    FloggedLumberdash(
        appName: 'Flogged Test',
        appVersionName: '2.0.0',
        appVersionCode: 234,
        environment: kReleaseMode ? 'production' : 'debug',
        logstashUrl: 'http://my.logstash.instance',
        logstashPort: 5001,
    ),
]);

Use the package_info package to dynamically retrieve app version information.

  1. Log some stuff!
0
likes
120
pub points
47%
popularity

Publisher

unverified uploader

Log to Logstash from Flutter applications using lumberdash

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, lumberdash

More

Packages that depend on flogged