Is the output content of the debug filter related to the output time - vscode-debugger

if debug output in same time, debug filter can't filter anything. why and how to fix this.
thanks for your help
like this
not same time, it's ok

Related

High Precision Log Time for Chef Logs

I am starting to work with chefserver. I want to get some calculation from the logs of chefserver. However, the time stamp is displayed without milliseconds. In order to get more precise calculation I want the logs of the recipes to have milliseconds.
The logs are in the following format:
[2017-08-29T18:44:22+00:00] INFO: bash[dummyResource] ran successfully
Thanks in advance
You can change the formatter in your client.rb (or in cookbook library code but then it would only affect things after that code runs):
Chef::Log.logger.formatter = whatever
https://github.com/chef/mixlib-log/blob/master/lib/mixlib/log/formatter.rb shows the default formatter, you can subclass and tweak as you desire.

Yii2 disable debug log for specific controller/action

In general in development mode i have to use the debug and logging for bugtracing.
But on a specific controller/action i don't want this to happen since it's just a background ajax that gets called every 2 seconds, which ends ups in a huge amount of "unneeded" logs.
How can I exclude this specific call "site/ajaxupdate" from being logged?
You could simply disable the corresponding log target in your controller, e.g. :
\Yii::$app->log->targets['file']->enabled = false;
Read more about toggling log targets.
YII 2 it may be accomplished by:
foreach(\Yii::$app->log->targets as $target){
$target->setEnabled(false);
}

Display time in Xcode breakpoint

In Xcode 6 I have created a breakpoint that do not interrupt the program execution to display informations.
Here is the result between results of NSLog calls:
I now want to add a time information to this message as done by NSLog does. How can I achieve this?
Similar behavior
I know how to obtain such a result using Debugger Command but I want to know how to achieve it using Log Message:
As you can see in the hints: #exp#
so you can write this:
#[NSDate date]# - some additional message
Output will be:
2018-06-28 14:06:45 UTC - some additional message
(works only for the 'Log Message' type)
Xcode log time
Using Swift you are able to use #Date().debugDescription# my message (UTC time)

How to read throughput-sampler sink values in spring-xd

Stream definition:
"http --port=9400 | throughput-sampler"
I've sent the START and END/ STOP payloads but I'm not sure how to read out the throughput values.
It doesn't show up in logs, so I'm wondering how do I access the values. There seems to be no documentations detailing it either.
Appreciate any help!
This looks like a bug; add
log4j.logger.org.springframework.xd.integration.throughput=INFO
to the
xd/config/xd-singlenode-logger.properties
or
xd/config/xd-container-logger.properties
depending on which topology you are using, and you'll see...
09:56:16,358 1.1.0.SNAP INFO pool-10-thread-10 throughput.ThroughputSamplerMessageHandler - Throughput sampled for 2 items: 0/s in 5584ms elapsed time.
The default endMessage is END.

Magento event logging not showing all events

I added this line to /app/Mage.php under the function dispatchEvent($name, $data), just above the return statement:
Mage::log($name, null, 'events.log');
However, my events.log only shows 3 different events:
2013-02-13T21:46:21+00:00 DEBUG (7): resource_get_tablename
2013-02-13T21:46:21+00:00 DEBUG (7): core_collection_abstract_load_before
2013-02-13T21:46:21+00:00 DEBUG (7): core_collection_abstract_load_after
These three are just repeated over and over. No other event names ever show up. Does this mean the other events aren't firing somehow?
I figured out the solution. With the line of code in question, in the file and function in question, with the setting in System > Configuration > Advanced > Developer > Log Settings > Enable Logging set to "No", I only get the three events, listed in the question, outputted to the log file.
If I set that setting you "Yes", I then get every event that gets fired. This seems like an "obvious answer to a dumb question", but since I hard coded the logging code into the function that handles events, I don't see how the logging setting matters. Why would dispatchEvent() get completely different inputs depending on a logging setting? Wouldn't it need the name of the event regardless of a logging setting? But alas, I'm fairly new to Magento and don't yet quite fully understand the ideas inside of it.
One additional thing I found: With that one Mage:log line of code added, whenever I save settings in configuration, the page 500's, though, the settings DO get saved. I'm not so worried about this.
TL;DR: set "Enable Logging" to "Yes" under System > Configuration > Advanced > Developer > Log Settings, on top of adding the line of code to dispatchEvent().

Resources