Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to log process arguments #1

Open
gagan-bansal opened this issue Oct 19, 2022 · 0 comments
Open

Option to log process arguments #1

gagan-bansal opened this issue Oct 19, 2022 · 0 comments

Comments

@gagan-bansal
Copy link
Owner

Explore option to log process arguments. This may be useful in case of service.js as a service and act based on the process arguments.

Like a queue consumer service program process many queues and queue name is passed as process arguments. It would be nice if queue name is logged in all modules' log.

Example:

$ MUNIA_PROCESS_ARGV=1 node service.js  --queue foo &
$ MUNIA_PROCESS_ARGV=1 node service.js  --queue bar &

Log:

{"module": "service.js", "level":"info", "consuming RabbitMQ" , "queue":"foo", ...}
{"module": "service.js", "level":"info", "consuming RabbitMQ" , "queue":"bar", ...}
{"module": "my-rabbitmq.js", "level":"info", "acknowledged the content" , "queue":"foo", ...}
{"module": "my-rabbitmq.js", "level":"info", "acknowledged the content" , "queue":"bar", ...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant