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

flutter log info "[DateTime fileNmae className line ...](iOS && android && linux && macOS && windows && fuchsia).

DDLog #

[DateTime.now()][Type][System][className.funcName Line:lineNumber]: ...

example #

void onTest() {
  try {
    var map = {};
    jsonDecode(map["a"]);
  } catch (e) {
    debugPrint("$this $e");//flutter: _MetaDataDemoState#d5486 type 'Null' is not a subtype of type 'String'
    DLog.d("$e");//[log] [2025-03-27 10:13:00.725182][DEBUG][ios][_MetaDataDemoState.onTest Line:161]: type 'Null' is not a subtype of type 'String'
    DLog.i("$e");//[log] [2025-03-27 10:13:00.725901][INFO][ios][_MetaDataDemoState.onTest Line:162]: type 'Null' is not a subtype of type 'String'
    DLog.w("$e");//[log] [2025-03-27 10:13:00.726502][WARN][ios][_MetaDataDemoState.onTest Line:163]: type 'Null' is not a subtype of type 'String'
    DLog.e("$e");//[log] [2025-03-27 10:13:00.727041][ERROR][ios][_MetaDataDemoState.onTest Line:164]: type 'Null' is not a subtype of type 'String'
  }
}

关闭颜色(andriod studio 不支持)

DLog.enableColor = false;

打开颜色(VSCode支持)

DLog.enableColor = true;

Getting Started #

dependencies:
  flutter:
    sdk: flutter

  ddlog: ^1.0.1

0
likes
150
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

flutter log info "[DateTime fileNmae className line ...](iOS && android && linux && macOS && windows && fuchsia).

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ddlog