FloggedLumberdash class

Sends Lumberdash logs to a logstash instance.

import 'package:lumberdash/lumberdash.dart';
import 'package:flogged/flogged.dart';
// More imports

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialised();
  final pInfo = await PackageInfo.fromPlatform();
  putLumberdashToWork(withClients: [
    FloggedLumberdash(
      appName: 'Flogged Test',
      appVersionName: pInfo.version,
      appVersionCode: int.parse(pInfo.buildNumber),
      environment: kReleaseMode ? 'production' : 'debug',
      logstashUrl: 'http://my.logstash.instance',
      logstashPort: 5001,
    ),
  ]);
  runApp(MyApp());
}

Constructors

FloggedLumberdash({required String appName, required String appVersionName, required int appVersionCode, required String environment, required String logstashUrl, required int logstashPort})

Properties

appName String
The name of the app e.g. "My App"
final
appVersionCode int
The version code of the app e.g. 1234
final
appVersionName String
The version name of the app e.g. 2.0.0
final
environment String
Either "production" or "debug" as appropriate
final
hashCode int
The hash code for this object.
no setterinherited
logstashPort int
The port of the Logstash instance e.g. 4000
final
logstashUrl String
The hostname of the Logstash instance e.g. "http://my.logstash.instance"
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

logError(dynamic exception, [dynamic stacktrace]) → void
Use logError, in a similar fashion to logFatal, should be used to capture a situation that cannot be fixed and requires a special level of attention. However, in this case you can use this method to capture an exception and a stacktrace, in case your irreparable situation represents a crash in your code.
logFatal(String message, [Map<String, String>? extras]) → void
Use logFatal to produce a log that represents an irreparable situation. This level of logs should require your total attention. In an ideal world, you should never see this type of logs. message is the most important piece of the log, and extras are attached information that can be added to expand the meaning and context of your log.
logMessage(String message, [Map<String, String>? extras]) → void
Use logMessage to produce an mere informative log. message is the most important piece of the log, and extras are attached information that can be added to expand the meaning and context of your log.
logWarning(String message, [Map<String, String>? extras]) → void
Use logWarning to produce a log that requires a special level of attention, since it might indicate an unexpected situation, or something that should not happen message is the most important piece of the log, and extras are attached information that can be added to expand the meaning and context of your log.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited