Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: utils/pub/log.dart

Issue 13095015: Use backtracking when solving dependency constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise, update to latest corelib, and make backtracker default. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: utils/pub/log.dart
diff --git a/utils/pub/log.dart b/utils/pub/log.dart
index 77a9623d9f664c0b6524c34b949339bce7f93e2b..e01425b7d2bf6789d0b08a4ec67baf690726b3f4 100644
--- a/utils/pub/log.dart
+++ b/utils/pub/log.dart
@@ -37,6 +37,9 @@ class Level {
/// operation, process spawning, or file IO.
static const IO = const Level._("IO ");
+ /// Incremental output during pub's version constraint solver.
+ static const SOLVER = const Level._("SLVR");
+
/// Fine-grained and verbose additional information. Can be used to provide
/// program state context for other logs (such as what pub was doing when an
/// IO operation occurred) or just more detail for an operation.
@@ -78,6 +81,9 @@ void message(message) => write(Level.MESSAGE, message);
/// Logs [message] at [Level.IO].
void io(message) => write(Level.IO, message);
+/// Logs [message] at [Level.SOLVER].
+void solver(message) => write(Level.SOLVER, message);
+
/// Logs [message] at [Level.FINE].
void fine(message) => write(Level.FINE, message);
@@ -178,6 +184,7 @@ void showNormal() {
_loggers[Level.WARNING] = _logToStderr;
_loggers[Level.MESSAGE] = _logToStdout;
_loggers[Level.IO] = null;
+ _loggers[Level.SOLVER] = null;
_loggers[Level.FINE] = null;
}
@@ -188,6 +195,18 @@ void showIO() {
_loggers[Level.WARNING] = _logToStderrWithLabel;
_loggers[Level.MESSAGE] = _logToStdoutWithLabel;
_loggers[Level.IO] = _logToStderrWithLabel;
+ _loggers[Level.SOLVER] = null;
+ _loggers[Level.FINE] = null;
+}
+
+/// Sets the verbosity to "solver", which shows errors, warnings, messages, and
+/// solver logs.
+void showSolver() {
+ _loggers[Level.ERROR] = _logToStderr;
+ _loggers[Level.WARNING] = _logToStderr;
+ _loggers[Level.MESSAGE] = _logToStdout;
+ _loggers[Level.IO] = null;
+ _loggers[Level.SOLVER] = _logToStdout;
_loggers[Level.FINE] = null;
}
@@ -197,6 +216,7 @@ void showAll() {
_loggers[Level.WARNING] = _logToStderrWithLabel;
_loggers[Level.MESSAGE] = _logToStdoutWithLabel;
_loggers[Level.IO] = _logToStderrWithLabel;
+ _loggers[Level.SOLVER] = _logToStderrWithLabel;
_loggers[Level.FINE] = _logToStderrWithLabel;
}

Powered by Google App Engine
This is Rietveld 408576698