/// class PD.Commands.CommandLogger
/// using PD.Commands.CommandDecorator

PD.Commands.CommandLogger = 
PD.Commands.CommandDecorator.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    execute: function (args) {

        var command = this.get_command();

        command.execute(args);

        try {
            if (command.props("log") !== false) {
                console.log({
                    command: this.get_command().get_id(),
                    state: JSON.stringify(this.get_command().state()),
                    inits: JSON.stringify(this.get_command().inits())
                });
            }
        }
        catch (ex) {
        }

    }

});