I have a GKE application with 20 nodes running Go. I would like to merge all the logs for viewing in the Google Developers Console Log Viewer, but I am having two problems. I cannot get severity filtering and every new line in my log message starts a new log entry in the log (problem with new lines in the log).
I have google-fluent-d setup, so all stdout are logged in the cloud, and I used log.Lshortfile, call depth and log.Logger.Output to get the file name and line number from the "log" library.
I looked at this library: "google.golang.org/cloud/logging", but I had problems with its operation.
Is there a library somewhere or an example of a better way to write logs to GKE and GCE?
There are a few things you can do, depending on how ambitious you are.
, , , JSON. google-fluentd JSON , API . , severity JSON, JSON () .
severity
( ) , . , , , , . , , - , .
Source: https://habr.com/ru/post/1630093/More articles:cleaning the controller and angularjs functions - for a drop-down list with several favorites to order - performanceNPE using Google maps services on mapView.onCreate (...) - androidAnaconda installation does not find packages - pythonCoreNLP server does not return object references - stanford-nlpPandas: unable to execute request - pythonWhy does the RxPY TwistedScheduler raise an AlreadyCalled error? - pythonHow to display various error messages with Python functions - pythonPHP How to "stretch" a string after duplicating each character in a string (returning a string) - stringiPhone SDK: welcome video - objective-cPlace the MySQL JAR connector in the WEB-INF / lib of my WAR, and not in $ CATALINA_HOME / common / lib? - javaAll Articles