Skip to content

added Loggable

Compare
Choose a tag to compare
@ytake ytake released this 23 Dec 12:46

@loggable

for logger(illuminate/log, monolog)

  • option
params description
value log level (default: \Monolog\Logger::INFO) should Monolog Constants
skipResult method result output to log
name log name prefix(default: Loggable)
use Ytake\LaravelAspect\Annotation\Loggable;

class AspectLoggable
{
    /**
     * @Loggable
     * @param null $id
     * @return null
     */
    public function normalLog($id = null)
    {
        return $id;
    }
}

sample)

[2015-12-23 08:15:30] testing.INFO: Loggable:__Test\AspectLoggable.normalLog {"args":{"id":1},"result":1,"time":0.000259876251221}