How to suppress Alamofire output to debug console in Xcode - alamofire

Simplest Alamofire sample. main.swift:
import Alamofire
import Foundation
AF.request("https://httpbin.org/get").response { response in
// debugPrint(response)
}
RunLoop.current.run()
Writes to debug console output e.g:
2021-10-02 14:45:28.198648+0300 AlamofireExp1[4891:191952] [logging] volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags
2021-10-02 14:45:28.199070+0300 AlamofireExp1[4891:191952] [logging] volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags
2021-10-02 14:45:28.626982+0300 AlamofireExp1[4891:191952] [connection] nw_endpoint_handler_set_adaptive_read_handler [C1.1 54.159.86.231:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for read_timeout failed
2021-10-02 14:45:28.627089+0300 AlamofireExp1[4891:191952] [connection] nw_endpoint_handler_set_adaptive_write_handler [C1.1 54.159.86.231:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for write_timeout failed
2021-10-02 14:45:28.756444+0300 AlamofireExp1[4891:191941] [logging] volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags
2021-10-02 14:45:28.756749+0300 AlamofireExp1[4891:191941] [logging] volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags
Question: How to suppress this garbage (for me) output to debug console?

This isn't Alamofire logging, this is logging from the underlying OS. Unfortunately there's no good way to disable it. Technically you can add the OS_ACTIVITY_MODE environment variable set to disable for your builds, but that disable all OS module functionality, including your own OSLogs and signposts, among other features, so it's not recommended.

Related

Symfony Messenger: retry delay not working with Redis transport

I have a Symfony 4 application using the Symfony Messenger component (version 4.3.2) to dispatch messages.
For asynchronous message handling some Redis transports are configured and they work fine. But then I decided that one of them should retry a few times when message handling fails. I configured a retry strategy and the transport actually started retrying on failure, but it seems to ignore the delay configuration (keys delay, multiplier, max_delay) and all the retry attempts are always made without any delay, all within one second or a similarly short timespan, which is really undesirable in this use case.
My Messenger configuration (config/packages/messenger.yaml) looks like this
framework:
messenger:
default_bus: messenger.bus.default
transports:
transport_without_retry:
dsn: '%env(REDIS_DSN)%/without_retry'
retry_strategy:
max_retries: 0
transport_with_retry:
dsn: '%env(REDIS_DSN)%/with_retry'
retry_strategy:
max_retries: 5
delay: 10000 # 10 seconds
multiplier: 3
max_delay: 3600000
routing:
'App\Message\RetryWorthMessage': transport_with_retry
I tried replacing Redis with Doctrine (as implementation of the retrying transport) and voila - the delays started to work as expected. I therefore suspect that the Redis transport imlementation doesn't support delayed retry. But I read the docs carefully, searched related Github issues, and still didn't find a definite answer.
So my question is: does Redis transport support delayed retry? If it does, how do I make it work?
It turned out that Redis transport supports delayed retry, but only since Messenger version 4.4.

InvalidSessionDescriptionError: Invalid description, no ice-ufrag attribute

I'm trying to get asterisk 11.20.0 running with WebRTC (sip.js 0.72 which I believe is a fork of jssip), but I'm seeing the following (and the called party rings, but when the phone is answered the call gets hung up).
This is my setup:
What I see:
In the CLI:
[2015-11-24 01:01:53] NOTICE[43619][C-00000002]: res_rtp_asterisk.c:4441 ast_rtp_read: Unknown RTP codec 95 received from '(null)'
In Firefox:
InvalidSessionDescriptionError: Invalid description, no ice-ufrag attribute
Attachments:
SIP Dialogue (Asterisk CLI)
Webphone Log
Config Files (httpd.conf, sip.conf, rtp.conf)
Asterisk Compiled with Libuuid & Friends
What I've tried so far:
Changed webRTC implementations (tried chrome and firefox both with SIPML and SIP.JS)
Set the STUN server to null on the client side (stunServers: ['stun:null'])
Configured properly (I hope) my sip.conf and rtp.conf and httpd.conf
Made sure I have libuuid, uuid and their -devel companions and after i've recompiled asterisk.
What I've read:
http://forums.asterisk.org/viewtopic.php?p=201702
https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support
https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
http://jssip.net/documentation/misc/interoperability/asterisk/
http://sipjs.com/guides/server-configuration/asterisk/
https://kunjans.wordpress.com/2015/01/09/web-sip-client-sipml5-with-asterisk-13-on-centos-6-6/
http://forums.digium.com/viewtopic.php?f=1&t=89798
Please, if you can, give me a hand. I'm about to smash my box with a sledge hammer.
Faced same issue and followed instruction in http://forums.digium.com/viewtopic.php?f=1&t=90167 realise that:
This issue is caused because you asterisk don't have ICE support, you can solve that by installing the uuid/libuuid and uuid-devel/libuuid-devel packages on your system. Then recompile asterisk(be sure to rerun the configure script before the make command).
I did recompile my Astersik 11.16.0 with patch for ECDH support and fallback to prime256v1 https://issues.asterisk.org/jira/browse/ASTERISK-25265 and looks like lost uuid support at that time. Reverting back to non-patched version (with uuid support, use to be compiled before) resolved my issue with "no ice-ufrag attribute" error in Firefox console and calls are going well now from WebRTC client SIPML5 based to asterisk, but not in opposit direction

How to manage the OCLogger file?

I'm debugging a hybrid Worklight (6.1.0.01) application in Xcode (5.1.1). I'm seeing the following message in my log:
[DEBUG] [OCLogger] Max file size exceeded for log messages.
I"m assuming that this log file is managed by Worklight, as I do not have any custom native code running or explicit references to OCLogger. I do have calls to WL.Logger.debug.
How can I manage this log file? And where is it on my file system? (Truncating it will probably do the trick at this point.)
It is enabled by default. But you can disable using native or Javascript API Calls.
[OCLogger setCapture: NO];
For more info client side log capture
client side logging in client apps

NServiceBus License File for Dev Machine (keeps requesting)

I've been using NServiceBus successfully for I don't know how long. The license claimed to expire and informed me that I needed a new license file. So I went to the website and generated a new one (For a dev machine). Everytime I debug I get the same message and it requests the license file. Is there any way to prevent this message from showing up EVERY time I try to debug? (Like set a path programmatically possibly?)
<
Andreas : The ONLY mention of the license in the log file is as follows :
2013-03-05 14:24:23,983 [1] [INFO ] [NServiceBus.Licensing.LicenseManager] - No valid license found.
2013-03-05 14:24:23,986 [1] [DEBUG] [NServiceBus.Licensing.LicenseManager] - Trial for NServiceBus v3.3 has expired.
2013-03-05 14:24:23,988 [1] [WARN ] [NServiceBus.Licensing.LicenseManager] - Falling back to run in Basic1 license mode.
Here's a quick screen capture of the prompt after I select the new file. Just so you know it's SAYING it's a valid file.
I believe this can also happen if your license is for a different version of the software than you are running. You may need to request a license that aligns with your NSB version.
Once you received your free license, did you import it?
You need to click the "Browse..." button and select the license to import it!

Intellij idea using 10001 port

Intellij IDEA 12 Public Preview by default is listening to 10001 port for one of its plugins. In our company we use this port for other purposes and there seems to be no easy way to change this... Can anyone suggest any options? Been googling for about an hour to no avail.
IntelliJ IDEA EAP builds come with the YourKit Java Profiler agent enabled by default so that users can take CPU and Memory snapshots out of the box to report performance problems.
The agent is enabled via idea(64.exe).vmoptions file:
-agentlib:yjpagent=disablej2ee,disablealloc,sessionname=IntelliJIdea12
You can remove this line to disable profiler agent that will free up 10001+ ports.
Another solution is to change the default port using agent options:
-agentlib:yjpagent=disablej2ee,disablealloc,sessionname=IntelliJIdea12,port=31337
If you are on Mac, this configuration is done via Info.plist, see the FAQ.
On Linux it's added in idea.sh script:
IS_EAP="true"
if [ "$IS_EAP" = "true" ]; then
OS_NAME=`echo $OS_TYPE | "$TR" '[:upper:]' '[:lower:]'`
AGENT_LIB="yjpagent-$OS_NAME$BITS"
if [ -r "$IDE_BIN_HOME/lib$AGENT_LIB.so" ]; then
AGENT="-agentlib:$AGENT_LIB=disablej2ee,disablealloc,sessionname=IntelliJIdea12"
fi
fi
Just change to IS_EAP="false" or delete the agent .so file to disable it.
Following Vladimir's suggestion I've created a request to use onlylocal option by default, feel free to vote.
As a YourKit developer, I'd like follow-up Serge's answer and recommend to add "onlylocal" to the list of YourKit agent options. This option forces profiler to open port on loopback network interface. Potentially it's more secure and on Windows you will not see security warning.