lburgazzoli commented on issue #362: Use consistent logging style
URL: https://github.com/apache/camel-k/issues/362#issuecomment-456807793
 
 
   I've been experimenting a little to wrap the logging primitive provided by 
the operator so the operator part looks like:
   
   ```
   {"level":"info","ts":1548251222.2835329,"logger":"cmd","msg":"Go Version: 
go1.11"}
   {"level":"info","ts":1548251222.2836378,"logger":"cmd","msg":"Go OS/Arch: 
linux/amd64"}
   {"level":"info","ts":1548251222.2836797,"logger":"cmd","msg":"operator-sdk 
Version: v0.3.0"}
   {"level":"info","ts":1548251222.2987003,"logger":"leader","msg":"Trying to 
become the leader."}
   {"level":"info","ts":1548251222.2987378,"logger":"leader","msg":"Skipping 
leader election; not running in a cluster."}
   {"level":"info","ts":1548251222.346715, "logger":"cmd","msg":"Registering 
Components."}
   
{"level":"info","ts":1548251222.3477561,"logger":"kubebuilder.controller","msg":"Starting
 EventSource","controller":"integration-controller","source":"kind source: /, 
Kind="}
   
{"level":"info","ts":1548251222.3479214,"logger":"kubebuilder.controller","msg":"Starting
 EventSource","controller":"integration-controller","source":"kind source: /, 
Kind="}
   
{"level":"info","ts":1548251222.3484404,"logger":"kubebuilder.controller","msg":"Starting
 EventSource","controller":"integrationcontext-controller","source":"kind 
source: /, Kind="}
   
{"level":"info","ts":1548251222.3486776,"logger":"kubebuilder.controller","msg":"Starting
 EventSource","controller":"integrationplatform-controller","source":"kind 
source: /, Kind="}
   {"level":"info","ts":1548251222.3487132,"logger":"cmd","msg":"Starting the 
Cmd."}
   {"level":"info","ts":1548251222.448883, 
"logger":"kubebuilder.controller","msg":"Starting 
Controller","controller":"integration-controller"}
   
{"level":"info","ts":1548251222.4488826,"logger":"kubebuilder.controller","msg":"Starting
 Controller","controller":"integrationplatform-controller"}
   
{"level":"info","ts":1548251222.4489074,"logger":"kubebuilder.controller","msg":"Starting
 Controller","controller":"integrationcontext-controller"}
   {"level":"info","ts":1548251222.549115, 
"logger":"kubebuilder.controller","msg":"Starting 
workers","controller":"integration-controller","worker count":1}
   
{"level":"info","ts":1548251222.5491164,"logger":"kubebuilder.controller","msg":"Starting
 workers","controller":"integrationcontext-controller","worker count":1}
   
{"level":"info","ts":1548251222.5491395,"logger":"kubebuilder.controller","msg":"Starting
 workers","controller":"integrationplatform-controller","worker count":1}
   
{"level":"info","ts":1548251222.5492136,"logger":"camel-k.controller.integrationcontext","msg":"Reconciling
 IntegrationContext","request-namespace":"camel-k","request-name":"jvm"}
   
{"level":"info","ts":1548251222.5492213,"logger":"camel-k.controller.integrationplatform","msg":"Reconciling
 IntegrationPlatform","request-namespace":"camel-k","request-name":"camel-k"}
   
{"level":"info","ts":1548251222.5492449,"logger":"camel-k.controller.integrationcontext","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"jvm","type":"IntegrationContext","ns":"camel-k","name":"jvm"}
   
{"level":"info","ts":1548251226.9962876,"logger":"camel-k.controller.integration","msg":"Reconciling
 Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251226.9963143,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
initialize","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   {"level":"info","ts":1548251227.004409, 
"logger":"camel-k.controller.integration","msg":"Reconciling 
Integration","request-namespace":"camel-k","request-name":"hello"}
   {"level":"info","ts":1548251227.00443,  
"logger":"camel-k.controller.integration","msg":"Invoking action 
build-context","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   {"level":"info","ts":1548251227.008996, 
"logger":"camel-k.controller.integration","msg":"Reconciling 
Integration","request-namespace":"camel-k","request-name":"hello"}
   {"level":"info","ts":1548251227.009017, 
"logger":"camel-k.controller.integration","msg":"Invoking action 
deploy","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   
{"level":"info","ts":1548251227.0411463,"logger":"camel-k.controller.integration","msg":"Reconciling
 Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251227.0411794,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   
{"level":"info","ts":1548251227.0475428,"logger":"camel-k.controller.integration","msg":"Reconciling
 Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251227.0475745,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   
{"level":"info","ts":1548251227.0584202,"logger":"camel-k.controller.integration","msg":"Reconciling
 Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251227.0585632,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   {"level":"info","ts":1548251227.118853, 
"logger":"camel-k.controller.integration","msg":"Reconciling 
Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251227.1188924,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   {"level":"info","ts":1548251228.299993, 
"logger":"camel-k.controller.integration","msg":"Reconciling 
Integration","request-namespace":"camel-k","request-name":"hello"}
   
{"level":"info","ts":1548251228.3000236,"logger":"camel-k.controller.integration","msg":"Invoking
 action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   
{"level":"info","ts":1548251232.0046387,"logger":"camel-k.controller.integration","msg":"Reconciling
 Integration","request-namespace":"camel-k","request-name":"hello"}
   {"level":"info","ts":1548251232.00472,  
"logger":"camel-k.controller.integration","msg":"Invoking action 
monitor","request-namespace":"camel-k","request-name":"hello","type":"Integration","ns":"camel-k","name":"hello"}
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to