at
/**
* @param Object $object
* @param $item
*/
public function exampleAction(Object $object, $item)
{
foreach ($object->getCarriers() as $i => $value) {
if ($item->getCount() > 2 && $value == 100) {
$option = $i;
}
}
//nasty code
//more
//more
//more
//and more . . .
foreach ($object->getOtherThing() as $option => $value) {
if ($item->getMount() > 100 && $value == 'A') {
$item->setMountType($option);
}
}
$item->setCarrier($option);
}
https://github.com/LinioIT/linio-standards/blob/master/standards/logging.md
Common fields
- level_name
- message
- context
- extra
- channel
- datetime
Parsing entry rules
- JSON encoded
- single line
- fields requirements
e0675e7030d3eecee0be4b7cf22a7063
Request Id generation
- Angular interceptor
- Symfony listener
Logging
- monolog
* stream
* new relic
Trying to place an order
Getting the request Id
Getting the request Id
Searching over all application logs
Searching over an specific application log
For whom is it useful?
- Developers
- PM team
- Business people