ico3_logger 1.0.0 copy "ico3_logger: ^1.0.0" to clipboard
ico3_logger: ^1.0.0 copied to clipboard

Zero-setup, ultra-fast logs, live filtering, log sniffer, post-mortem, multi-loggers, JSON/CSV.

iCo3_Logger

Dive in the Debug

iCo3_Logger #

By iCoCube

Fast. Simple. Powerful.
Logging for Dart/Flutter devs who want zero hassle and total control: live filters, crash tracing, multi-loggers, and exportable logs.

pub package License perf Ultra-Fast Logger Website


▶️ Get Started #

import 'package:ico3_logger/ico3_logger.dart';

void main() {
  Log.info('', 'Hello World');
  Log.setDecoration(mode: 'emoji', timeLine: true, category: true);
  Log.debug('network', 'Connected 🚀');
  Log.installService(service: SnifferLogService(trigger: LogTrigger(level: 'critical')));
  Log.critical('core', 'Critical alert 🚨');
}

Output:

[info] Hello World
<0> [🛠️debug] (network) --> Connected 🚀
<1> [🚨critical] (core) --> Critical alert

🧪 Install:

dart pub add ico3logger

📌 Why iCo3_Logger? #

iCo3_Logger is built for real apps—ultrafast, lightweight, and extensible. Log effortlessly or dive deep with advanced features.

  • As simple as print(), but smarter
  • <0.1µs performance, minimal footprint
  • Live filter by category/level
  • Multi-loggers for parallel streams
  • Export to CSV or JSON
  • Custom services: sniffers, post-mortem, and more
  • Emojis, timestamps, colors—your way
  • Extensible for any project
  • Optional remote CLI LogViewer for debugging.

Find complete documentation and examples here.


✴ Key Features #

▶️ Log Instantly #

Log.info('', 'Hello World');

➕ Add Context #

Log.setDecoration(category: true, timeStamp: true);
Log.debug('network', 'Start connection');
2025-04-16 10:30:45.123 [debug] (network) --> Start connection

✅ Filter Logs #

Log.setCategories('<clear> core, ui(critical)');
Log.warning('ui', 'Minor issue'); // Skipped
Log.critical('ui', 'Major failure'); // Shown

🚀 Ultrafast Critical Mode #

Log.enterCriticalMode(size: 50);
Log.critical('core', 'System down');
Log.exitCriticalMode();

Runs with minimal footprint in timing-critical zones.

📤 Export Logs #

Log.enableFileOutput(logFileName: "log.csv", format: SaveFormat.csv);
timeStamp,level,category,message
2025-04-16T10:30:45.123,info,core,Running

🛠️ Custom Services #

Log Probe

Log.installService(
  service: LogProbeService(
    probeController: probeController,
    preSize: 100,
    postSize: 25,
    triggerCount: 1));

Analyze logs around trigger events (e.g., critical errors).

Post-Mortem Logs

Log.installService(
    service: LogProbeService(
    onEndRepeat: (id) {
        Log.disableAllOutputs();
        LogIO.exitApplication();
        },
    probeController: FatalTrigger(),
    preSize: 25));

Capture logs after fatal events for debugging.

⏱️ Timeline (µs) #

Log.startTimeLine();
Log.info('core', 'Processing');
Log.stopTimeLine();

Track execution time in microseconds.

🎨 Customize Output #

Log.setDecoration(mode: 'emoji', timeStamp: true);

Emojis: 🛠️ (debug), 🚀 (info), 🚨 (critical), ⚠️ (warning), 🔴 (error).

🔗 Multi-Loggers #

Log.createLogger('AppLogger', categories: '<clear> app, core');

🔋 In-Memory Logs #

Log.enableStorageOutput();
Log.printMessageList();

🔧 YAML Setup #

Log.loadContext('path');
loggers:
  - id: "Main"
    categories: "<clear> core(warning), network"
    outputs:
      console: true
      file:
        path: "log.json"
        format: "json"

🧩 Extend It #

Add custom services, outputs, or filters. iCo3_Logger adapts to your app’s needs.



🧰 Tools & Utilities #

🖥️ CLIViewer — Real-time Log Monitor #

CLIViewer is a lightweight command-line tool that lets you watch your logs live from any machine.

dart pub global activate ico3_logger
dart run ico3_logger:cliViewer <host:port>

Once connected, you’ll see your logs in real time:

📡 LoggerPrinter listening on ws://192.168.1.174:4222
✅ Client connected from 192.168.1.174
[info] (test) --> message info
[warning] (test) --> message warning

Use case: Connect your app remotely with:

Log.connectViewer(address: 'ws://192.168.1.174:4222');

No setup, no dashboard — just pure live feedback.

!📘Learn more about CLIViewer

📈 Support the Project #

⭐ Star us on GitHub
📥 Grab it on pub.flutter-io.cn
🧑‍💻 Contact us for advanced features


📚 Docs & Examples #

📘 Full Docs
🧪 Example Code


Log smarter. Build faster.
— The iCo3 Team

0
likes
150
points
66
downloads

Publisher

unverified uploader

Weekly Downloads

Zero-setup, ultra-fast logs, live filtering, log sniffer, post-mortem, multi-loggers, JSON/CSV.

Repository (GitHub)
View/report issues

Topics

#debugging #logging

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

intl, path, web, yaml

More

Packages that depend on ico3_logger