allcount / allcountjs

Rapid application development framework for Node.js
http://allcountjs.com
MIT License
402 stars 83 forks source link

Debug messages in hooks #114

Closed ghost closed 8 years ago

ghost commented 8 years ago

Is it possible to add console.log or a logger service inside beforeSave or other hooks? Any example?

paveltiunov commented 8 years ago

@IGZgustavomarin it's possible now. Just use Console dependency in crud hook.

CreativeWolf commented 8 years ago

@IGZgustavomarin Here's an example if it helps...

beforeSave: function(Entity, Crud, Console) {
          Console.log(Entity.applicantstatus.name);
          Console.log(Entity.applicantstatus.id);
}
ghost commented 8 years ago

thanks!