DEV Community

Ravi Kumar
Ravi Kumar

Posted on

POCO::Logger writing a comment in the first line of log file

I am using C++-based Docker container and implemented POCO::Logger for logging. And, the logs files are being rotated in every 5 minutes. The POCO::Logger is adding a comment in the first line. I don't want this comment at first line in my log files, how can I get rid of it? Does POCO provides any method/ config to achieve the same?

poco.log:

Log file created/rotated Friday, 15 Nov 24 11:48:17 GMT

{ "@timestamp":"2024-11-15T11:48:17.490Z","log":{"level":"Information"}, "container":{"name":"testrsk","id":"dlp-testrsk-1.2.500-746f5748cc-mfdz4"}, "labels": {"Description":"Statistical Information Per Event","EventClassID":"EventStats","Severity":"Medium","autoguid":"013e2e4b-0e04-44bc-9ff9-0bf901c80d6d","direction":"read","dlpseverity":"WARNING","eventglobalid":"unknown","failed":"no","source":"[\"dxl://kfk-dev-kafka-0.kfk-dev-kafka-headless.dev-epoeksdatabus.svc.cluster.local:9092,kfk-dev-kafka-1.kfk-dev-kafka-headless.dev-epoeksdatabus.svc.cluster.local:9092,kfk-dev-kafka-2.kfk-dev-kafka-headless.dev-epoeksdatabus.svc.cluster.local:9092/kafka.raw/group0/0\"]","tenant":"0A85E628-EAB7" ,"autoid":8,"dlpeventid":100} }
poco config file:

rsk_logging:
event:
level: critical
message:
level: information
rotation: 5minutes
count: 10
archive: timestamp
flush: false
stats:
level: information
rotation: 5minutes
count: 10
archive: timestamp
flush: false
logfile: /shared/logs/rsk
I don't want comments at the first line in the log files.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs