← Back to list

logging-standards-enforcement
by AVRA-CADAVRA
⭐ 0🍴 0📅 Jan 24, 2026
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.debugdeveloper.log(..., level: 800)-LogLevel.infodeveloper.log(..., level: 900)-LogLevel.warningdeveloper.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',
);
}
Score
Total Score
60/100
Based on repository quality metrics
✓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
Reviews
💬
Reviews coming soon