Skip to content

remove emojis and move info logs for controller to debug #2493

@cmwylie19

Description

@cmwylie19

Describe what should be investigated or refactored

When the log level is set to info, I do not think we should see information about the implementation detail of the controller, I think that is for debug. At the info level I expect to see information only about the module.

> k logs deploy/pepr-static-test-watcher -f -n pepr-system 
{"level":30,"time":1753887716577,"pid":1,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Pepr Controller (v0.0.0-development)"}
{"level":30,"time":1753887716578,"pid":1,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Applying the Pepr Store CRD if it doesn't exist"}
{"level":30,"time":1753887716693,"pid":1,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Loading module /app/load/module-d4c15e45851e578acc04da8d1fce7ea157e1e0b0b7d3bc32d13eb96c19462f07.js.gz"}
{"level":30,"time":1753887716695,"pid":1,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"File hash matches, running module"}
{"level":30,"time":1753887718280,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Capability hello-pepr registered"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Watch Action configured for CREATE"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","name":"pepr-demo-2","msg":"hello-pepr: V1Namespace"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Watch Action configured for CREATE"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","name":"example-2","msg":"hello-pepr: V1ConfigMap"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Watch Action configured for CREATEORUPDATE"}
{"level":30,"time":1753887718281,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","labels":{"chuck-norris":""},"msg":"hello-pepr: V1ConfigMap"}
{"level":30,"time":1753887718283,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Registering store for hello-pepr"}
{"level":30,"time":1753887718300,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"Server listening on port 3000"}
{"level":30,"time":1753887718877,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","v2-example-1":"was-here","v2-example-1-data":"{\"key\":\"ex-1-val\"}","v2-watch-data":"This data was stored by a Watch Action.","msg":"Pepr Store Ready"}
{"level":30,"time":1753887718878,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"✅ Controller startup complete"}
{"level":30,"time":1753887720032,"pid":17,"hostname":"pepr-static-test-watcher-d678f558c-pkwtk","msg":"✅ Scheduling processed"}
┌─[cmwylie19@C2WY6FCQVX] - [~/pepr/pepr-test-module] - [2025-07-30 11:03:52]
└─[0] <git:(main 478192d) > k logs deploy/pepr-static-test-watcher -f -n pepr-system 
{"level":30,"time":1753887834574,"pid":1,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Pepr Controller (v0.0.0-development)"}
{"level":30,"time":1753887834575,"pid":1,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Applying the Pepr Store CRD if it doesn't exist"}
{"level":30,"time":1753887834697,"pid":1,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Loading module /app/load/module-d4c15e45851e578acc04da8d1fce7ea157e1e0b0b7d3bc32d13eb96c19462f07.js.gz"}
{"level":30,"time":1753887834699,"pid":1,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"File hash matches, running module"}
{"level":30,"time":1753887836182,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Capability hello-pepr registered"}
{"level":30,"time":1753887836183,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Watch Action configured for CREATE"}
{"level":30,"time":1753887836183,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","name":"pepr-demo-2","msg":"hello-pepr: V1Namespace"}
{"level":30,"time":1753887836183,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Watch Action configured for CREATE"}
{"level":30,"time":1753887836183,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","name":"example-2","msg":"hello-pepr: V1ConfigMap"}
{"level":30,"time":1753887836184,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Watch Action configured for CREATEORUPDATE"}
{"level":30,"time":1753887836184,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","labels":{"chuck-norris":""},"msg":"hello-pepr: V1ConfigMap"}
{"level":30,"time":1753887836185,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Registering store for hello-pepr"}
{"level":30,"time":1753887836203,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"Server listening on port 3000"}
{"level":30,"time":1753887838068,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","v2-example-1":"was-here","v2-example-1-data":"{\"key\":\"ex-1-val\"}","v2-watch-data":"This data was stored by a Watch Action.","msg":"Pepr Store Ready"}
{"level":30,"time":1753887838070,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"✅ Controller startup complete"}
{"level":30,"time":1753887840705,"pid":17,"hostname":"pepr-static-test-watcher-f87589f5-xztmj","msg":"✅ Scheduling processed"}
klog.InfoS - Structured logs to the INFO log. InfoS should be used for routine logging. It can also be used to log warnings for expected errors (errors that can happen during routine operations). Depending on log severity it's important to pick a proper verbosity level to ensure that consumer is neither under nor overwhelmed by log volume:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🆕 New

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions