visch
12/05/2024, 3:40 PMevent
portion of message
. I know I can post parse stderr through jq
and get something similar, but I want to get Meltano to output this in the format I like.
Current message
[INFO] {'consumer': False, 'producer': True, 'string_id': 'tap-growbots', 'cmd_type': 'elb', 'run_id': '1fc1166c-0796-4f3e-89c2-43a401a204c5', 'job_name': 'test:tap-growbots-to-target-postgres', 'stdio': 'stderr', 'name': 'tap-growbots', 'event': '2024-12-05 10:32:39,684 | INFO | tap-growbots.campaign | Tap has custom mapper. Using 1 provided map(s).', 'level': 'info', 'timestamp': '2024-12-05T15:32:39.684881Z'}
What I want as the output
[INFO] 2024-12-05 10:32:39,684 | INFO | tap-growbots.campaign | Tap has custom mapper. Using 1 provided map(s).
Current Logging.yaml
version: 1
disable_existing_loggers: false
formatters:
default: # use a format similar to default generic python logging format
format: "[%(levelname)s] %(message)s"
handlers:
console: # log to the console (stderr) using structured_colored formatter, logging everything at DEBUG level and up
class: logging.StreamHandler
level: DEBUG
formatter: default
stream: "<ext://sys.stderr>"
root:
level: INFO # the root logger must always specify a level
propagate: yes # propagate to child loggers
handlers: [console] # by default use these three handlers
I know that I can play with the event
itself using the specific tap/target loggers but I don't want to mess with that part of the log right now.
Tried diving on this but I'm at my giveup moment as the value just isn't worth it here but I thought I'd ask.
Is my only option here a custom formatter?visch
12/05/2024, 4:04 PMmeltano run tap-growbots target-postgres
Edgar Ramírez (Arch.dev)
12/05/2024, 11:27 PMEdgar Ramírez (Arch.dev)
12/06/2024, 2:05 AMvisch
12/06/2024, 3:29 PMmessage
, must be a structlog thing? I'm sure I'm missing something, I'll dive more thank you @Edgar Ramírez (Arch.dev)Edgar Ramírez (Arch.dev)
12/06/2024, 4:22 PMevent
key as in the draft PR.visch
12/12/2024, 2:03 PM