Berocoder 14 Posted November 3, 2021 I want to use Google Cloud logging from Delphi. From https://cloud.google.com/apis/docs/client-libraries-explained While you can use Google Cloud APIs by making direct HTTP requests to the server (or RPC calls where available), we provide client library code for all our Cloud APIs that makes it easier to access them from your favorite languages Of course Delphi is not represented. Any hints on how I can use cloud for logging? It also mention that https://www.fluentd.org can be used from any language. But I still want samples how to use all this in practice. Any help appreciated! Share this post Link to post
Stéphane Wierzbicki 45 Posted November 4, 2021 Google search propose this: https://github.com/grijjy/DelphiGoogleAPI You can also have a look at TMS Cloud Share this post Link to post
Berocoder 14 Posted November 4, 2021 Thanks I also found that. I am not found of deploy a dll-file beside the exe- file Share this post Link to post
Berocoder 14 Posted November 5, 2021 22 hours ago, Stéphane Wierzbicki said: Google search propose this: https://github.com/grijjy/DelphiGoogleAPI You can also have a look at TMS Cloud I am not sure how complicated it would be to use https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Net.HttpClient instead. Grijjy use a dll for SSL. HttpClient use what is available in OS. Share this post Link to post
Stéphane Wierzbicki 45 Posted November 5, 2021 I really don't know. I'm not sure if you will be able to replace SSL DLL with pure Delphi code. Share this post Link to post
Angus Robertson 574 Posted November 6, 2021 If you want to avoid OpenSSL DLLs, you can buy YuOpenSSL from https://www.yunqa.de/ which is separate compiled DCUs for Delphi 5 to 11.0, offering the two latest OpenSSL releases for 1.1.1 and 3.0. Available for ICS, Indy and Synapse. With ICS, you just change a define, and YuOpenSSL works without any other code changes. While using the OS HTTP client may seem easier, you may hit limitations or bugs that take years to get fixed, like access to new protocols like TLS/1.3. Angus Share this post Link to post
Berocoder 14 Posted November 6, 2021 (edited) Ok I have never used https in Delphi. Just so I understand you correct. Delphi httpclient use openssl? No need to deploy additional dll with exe-file? Where can I find an example of this? The application is deployed on Windows Server 2012 Regards Roland Edited November 6, 2021 by Berocoder Share this post Link to post
Angus Robertson 574 Posted November 6, 2021 1 hour ago, Berocoder said: Delphi httpclient use openssl? Which Delphi HTTP client component are you talking about, there are many different ones from component packages. Angus Share this post Link to post
Berocoder 14 Posted November 6, 2021 I refer to builtin https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_an_HTTP_Client Regards Roland Share this post Link to post
Angus Robertson 574 Posted November 6, 2021 TNetHTTPClient uses different technologies on different platforms. Never used it myself since it did not exist 20 years ago when I stated writing internet applications, but understand it uses SChannel for SSL on Windows, so capabilities will vary dependent upon Windows version. I have a lot of problems with IIS SSL on Windows Server 2012, each time Windows Update runs and I reboot, I lose all my ECDSA ciphers and the web server does not start since I use ECDSA certificates. Those are the sort of support headaches you get from using the native functionality and why most people use alternates. Angus Share this post Link to post
Berocoder 14 Posted November 6, 2021 Ok thanks for the feedback. So back to the original question 😊 What is the best or most convenient path to connect and use Google Cloud logging from Delphi? I want to avoid dependencies to third-party components and dll-files if it is possible. But it is not a requirement. Roland Share this post Link to post
Angus Robertson 574 Posted November 7, 2021 Quote I want to avoid dependencies to third-party components If you want to avoid third party components, you are stuck with TNetHTTPClient which is a bare bones solution requiring extra code. That is why there are several better third party components, some free, some expensive. I support the free ICS which has a forum here, it includes a component that accesses the GMail API with OAuth2, most other Google APIs are probably similar in concept. Angus 1 Share this post Link to post
Fr0sT.Brutal 900 Posted November 8, 2021 On 11/6/2021 at 12:24 PM, Angus Robertson said: If you want to avoid OpenSSL DLLs, you can buy YuOpenSSL from https://www.yunqa.de/ which is separate compiled DCUs for Delphi 5 to 11.0, offering the two latest OpenSSL releases for 1.1.1 and 3.0. Available for ICS, Indy and Synapse. Or take a look at https://github.com/Fr0sT-Brutal/Delphi_SChannelTLS which implements WinAPI-provided TLS over any socket and has ready-to-use implementation of ICS socket. Share this post Link to post