スキル一覧に戻る
AVRA-CADAVRA

logging-standards-enforcement

by AVRA-CADAVRA

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: logging-standards-enforcement description: Enforces mandatory logging standards using developer.log() instead of print(). Use when writing production code, reviewing code, or fixing logging violations.

Logging Standards Enforcement

Mandatory Rule

❌ NEVER use print() or debugPrint() in production code ✅ ALWAYS use developer.log() from dart:developer for logging

Logging Pattern

import 'dart:developer' as developer;

// ✅ GOOD
developer.log('User signed in', name: 'AuthService');
developer.log('Operation failed', error: e, stackTrace: st, name: 'ServiceName');
developer.log('Data loaded successfully', name: 'DataService', level: 1000);

// ❌ BAD
print('User signed in');
debugPrint('Operation failed');

Log Levels

Use appropriate log levels:

  • developer.log(..., level: 700) - LogLevel.debug
  • developer.log(..., level: 800) - LogLevel.info
  • developer.log(..., level: 900) - LogLevel.warning
  • developer.log(..., level: 1000) - LogLevel.error

Structured Logging with AppLogger

When AppLogger service is available, use it for consistent patterns:

import 'package:avrai/core/services/logger.dart';

class MyService {
  final AppLogger _logger = const AppLogger(
    defaultTag: 'MyService',
    minimumLevel: LogLevel.debug,
  );

  Future<void> doSomething() async {
    _logger.info('Starting operation', tag: 'doSomething');
    try {
      // operation
      _logger.debug('Operation completed', tag: 'doSomething');
    } catch (e, st) {
      _logger.error('Operation failed', error: e, stackTrace: st, tag: 'doSomething');
    }
  }
}

Exception

Test files may use print() for debugging test output only:

// ✅ OK in test files
void main() {
  print('Running test suite...');
}

Error Logging Pattern

Always include context when logging errors:

try {
  await operation();
} catch (e, st) {
  developer.log(
    'Operation failed',
    error: e,
    stackTrace: st,
    name: 'ServiceName',
  );
}

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です