Skip to content

Log Levels

Zubair Rehman edited this page May 5, 2019 · 2 revisions

You can use following Log levels to tag logs:

1. LogLevel.INFO
2. LogLevel.WARNING
3. LogLevel.ERROR 
4. LogLevel.SEVERE

Usage

To save logs, simply call any of the method mentioned below:

1. Simple Info Log

    FLog.info(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log");

2. Simple Warning Log

    FLog.warning(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log");

3. Error Log

    FLog.error(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log");

4. Severe Log

    FLog.severe(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log");

5. Exception Log

    FLog.logThis(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log",
      type: LogLevel.SEVERE, 
      exception: Exception("This is an Exception!"));

6. Data Log

    FLog.logThis(
      className: "HomePage", // This is optional if not provided, then it will automatically be taken by getting calling class
      methodName: "_buildRow1", // This is optional if not provided, then it will automatically be taken by getting calling meth
      text: "My log",
      type: LogLevel.SEVERE,
      dataLogType: DataLogType.DEVICE.toString());
Clone this wiki locally