Download the PHP package yep/workflow-logger without Composer
On this page you can find all versions of the php package yep/workflow-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package workflow-logger
Workflow logger
Packagist
Reflection is available on Packagist.org, just add the dependency to your composer.json.
or run Composer command:
What Yep/WorkflowLogger do?
It helps to log workflows! :flushed:
Try to imagine this situation ↓↓↓
Question: How do you know, that each method done exactly what you expect?
Answer: I don't know, but I can add Logger! :blush:
Reaction: :+1:
So we will add Monolog\Logger ↓↓↓
Question: How many log items we will have?
Answer: 3! :yum:
Reaction: Yes, Correct! :+1:
Question: But what should we do if we want only one log record? :smirk:
Answer: Dunno... :scream:
Reaction: Really? So, have a look below! :sunglasses:
We will "improve" our logging ↓↓↓
Question: Much better! What do you think?
Answer: But but but moooom, in this case I can log these messages only with one type and I don't know, for which one is the context data...
Reaction: Yop, you are right... :sweat_smile:
However, you can use our WorkflowLogger! :bowtie:
Now the real magic with Yep\WorkflowLogger\Logger! :sunglasses: ↓↓↓
Log result
Reaction: :flushed: :scream:
Hints
- You can use the same workflow more times until is locked during finish or manually by lock method.
If you want to get the same workflow just call$logger->workflow($key)
withkey
as the first argument.
Every time you will call that method, logger will give you the same workflow until is locked. :sunglasses: - If you want to use
\Monolog\Formatter\ChromePHPFormatter
,\Monolog\Formatter\GelfMessageFormatter
,\Monolog\Formatter\WildfireFormatter
or similar with freezed log Levels, you have to use\Yep\WorkflowLogger\MonologFormatterAdapter
. - Do you know, that you can indent the workflow message? Yep, you really can. Just use second argument of
Yep\WorkflowLogger\Formatter\StandardFormatter($dumper, $indent)
. :wink:
That's all. I hope you like it. :kissing_smiling_eyes: