Permalink
Browse files

logging in example

  • Loading branch information...
1 parent 5cc9e60 commit c511451cbf9a80ec2a8ab826bd8ea2d9d959dbd0 @tj committed Apr 22, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 examples/migrate.js
View
@@ -38,8 +38,18 @@ migrate('coolest pet', function(next){
db.del('pets:coolest', next);
});
-migrate().up(function(err){
+var set = migrate();
+
+console.log();
+set.on('save', function(){
+ console.log();
+});
+
+set.on('migration', function(migration, direction){
+ console.log(' \033[90m%s\033[0m \033[36m%s\033[0m', direction, migration.title);
+});
+
+set.up(function(err){
if (err) throw err;
- console.log('done');
process.exit();
});

0 comments on commit c511451

Please sign in to comment.