How to toggle Quarkus file log handlers - quarkus

[Quarkus] How can we toggle the file log handlers
I am trying to use file handlers and want to configure if that file handler should be enabled or disabled
I am using this property
quarkus.log.handler.file."myHandler".enable=${myHandlerShouldBeEnabled}
quarkus.log.handler.file."myHandler".format=${someFormat}
quarkus.log.category."com.mypackage".handlers"=myHandler
But even on setting myHandlerShouldBeEnabled=false, logs are getting written to file.
Any suggestion will be helpful

This is indeed a bug that I reported here based on this question.
It should be fixed by this Pull Request.

Related

Creating Microsoft Flow Custom Connector fails with "Failed to upload file"

I'm trying to create a Microsoft Flow Custom Connector, from an OpenAPI file, as described here.
It allows me to import the file, and correctly shows the actions in the UI. However when I come to click "Create Connector", it fails with the message "Failed to upload file XXX with size 7952 and sasUrl https://...".
When I look in the browser network log, I see it is making OPTIONS requests to:
https://pafeblobprodln.blob.core.windows.net/20180510t000000z97e13b316929479b8f4f2ae6ab7856ba/sage-200-flow-connectorswagger.json?sv=2017-04-17&sr=c&si=SASpolicy&sig=XXX=&comp=block&blockid=XXX=
Which are failing with "403 CORS not enabled or no matching rule found for this request". The request 'Origin' header is set to https://unitedkingdom.flow.microsoft.com
It looks like CORS isn't enabled on the blob container, at least for unitedkingdom.flow.microsoft.com.
Using the same OpenAPI file, I can successfully create a Logic Apps Custom Connector, just not a Flow Custom Connector.
Has anyone else encountered, and worked around this problem?
Thanks
Pete
I found same problem. I did manage to make it work by creating the custom connector in powerapps via web.powerapps.com instead and then could use it in Flow. Hope that helps.
I also found that can't create approvals connectors in UK Flow. At least in the default environment you can't. If you make a new environment they can work.

How to debug HyperLedger Composer Transaction code in Playground

I am using a local install of Playground on MacOS.
I was successful to create my business network, add my model file and logic to this network and create assets and participants instances.
So now I am ready to submit my first transaction, but I get an error message in the popup window as a result to my request. The message per se is not the problem (it's about some Undefined asset), my problem is I want to debug this transaction code by producing some execution traces, using old-school printf or log message.
I tried to insert console.log(message) instructions in my transaction code but eventually I was not able to retrieve those logs traces (eg. using a command like docker logs -f composer).
Is there another way to produce logs traces? Or did I miss a config setting to defilter logs in docker logs?
Any help greatly appreciated!
Olivier.
On console logging (and seeing them in the browser Developer console), see this Stack Overflow here (hyperledger composer playground) Can you see results of console.log('something') in browser? (it also has a link to more info there
See here https://hyperledger.github.io/composer/latest/problems/diagnostics.html for more on logging / where to find debug logs.
As for setting checkpoint/breakpoints: These are set by the Editor tooling 🙂 In H/Composer, you can just use the embedded connector (eg such as TP functions) to try out / step through each breakpoint - for more info on VSCode -> https://code.visualstudio.com/docs/editor/debugging and Atom -> How do I set a breakpoint inside of atom's package? and I posted the link to diagnostics/logging above.
One quick way I used to insert breakpoints with debug messages, is to throw an exception using throw new Error(...) in the transaction method.
This shows up in the playground interface as well.

Log feignclient fallback exceptions

Fallback is a cool feature in Feignclient, however I would like to know what happens during fallback event. Is there anyway to output the root cause to log file?

Prevent browser-sync log data in firebug console

I often use gulp and its plugin browser-sync.
Every time i open firebug console tab, i see its full of logs like :
GET http://localhost:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=1457523519574-0 200 OK Û³ms browser...11.1.js (line 2)
I can use clear button but logs are interminable! they will appear twice.is there any persistent way to ride of these(browser-sync) logs?
Yes, there is. Just uncheck the option Show XMLHttpRequests within the Console panel's options menu.
Though note that this will disable the logging for all XMLHttpRequests, (aka AJAX requests).
There is currently no way to filter out specific logs. There are already two enhancements requests for that: issue 4507 and issue 6835 targetting Firebug 2, but as Firebug 3 will be built upon the DevTools, it is probably wiser to follow the DevTools related requests. The closest one to your issue is bug 905978 to filter out messages for blackboxed sources, but I've also filed bug 1102797 some time ago for allowing to blackbox sources from within the Console panel and bug 1255311 right now for ignoring specific log messages.

I can't enable or disable modules. I'm getting "An error occurred while saving this configuration"

I have a new fairly fresh install of Magento 1.7.0.2. I installed two custom payment method modules that are working fine. But now whenever I try to disable or enable any Payment Method or Shipping Method it gives me an error like this:
An error occurred while saving this configuration: Warning:
preg_match() expects parameter 2 to be string, array given in
/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php
on line 57
Do you have any idea why?
EDIT 2:
I found the problem. It was caused by a patch I applied to fix to a previous BUG. :P
EDIT:
So I disabled all custom modules and I was still getting the same error. I logged what was happening and it seems that some core modules are sending an array to be saved.
Like PayPal Express Checkout for instance. One of the config options is the Time of Day in the SFTP credentials for Settlement Report Settings. It's composed by three different drop-downs and it's sending an array to be saved!
In the Shipping Methods, UPS has a config options called Allowed Methods, and it's also sending an array!
I still don't know why it wasn't happening before and now it is. They shouldn't be encrypting everything. Any clues?
I had the same issue, its a known bug, try this around line no. 135 on code/core/mage/Adminhtml/model/config/data.php
// add this code
$backendClass=false;
if (isset($fieldConfig->backend_model)) {
$backendClass = $fieldConfig->backend_model;
} // before this
if (!$backendClass) {
$backendClass = 'core/config_data';
}
This actually is a reported bug in Magento that seems to affect encrypted config settings (passwords, API keys, etc.).
http://www.magentocommerce.com/bug-tracking/issue?issue=14217
Try disabling the first of the modules, log out of the admin panel, clear /var/cache and see if the problem still exists. If it does, do the same with the second module.
The problem should be gone. Now that you know which module causes the problems you can either decide to try another module instead or debug to see whats going wrong.
Put a breakpoint on line 57 in /app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php to see what goes wrong. It seems that the second parameter is not a string (might be null for example due to wrong configuration or something) when its given to the preg_match function. Maybe this helps you to identify the problem.
Regards
Disabling modules through the back office isn't a good idea as it only disables the block output, if you would like to disable a module you should go to app/etc/modulesand there you should find Module_Name.xmlfile - in this file just put false in active node.

Resources