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

Can I ignore some field #48

Open
memwey opened this issue Sep 26, 2017 · 2 comments
Open

Can I ignore some field #48

memwey opened this issue Sep 26, 2017 · 2 comments

Comments

@memwey
Copy link

memwey commented Sep 26, 2017

Greeting. I find the package is useful and hope you don't mind that I ask a silly question.
In the example, it show the default log string like this.

{"@version": 1,
 "account": "pyr",
 "lineno": 1,
 "levelno": 30,
 "filename": "test.py",
 "thread": 140566036444928,
 "@timestamp": "2015-03-30T09:46:23.000Z",
 "threadName": "MainThread",
 "relativeCreated": 51079.52117919922,
 "process": 10787,
 "source_host": "phoenix.spootnik.org",
 "processName": "MainProcess",
 "pathname": "test.py",
 "args": [],
 "module": "test",
 "msecs": 999.9005794525146,
 "created": 1427708782.9999006,
 "name": "root",
 "stack_info": null,
 "funcName": "<module>",
 "levelname": "WARNING",
 "message": "foo"}

However, I think the outpout information is too much for me. I learn that the necessary field the logstash need is @version and @timestamp. So can I set fmt to ignore some field then the result can be like this.

{"@version": 1,
 "@timestamp": "2015-03-30T09:46:23.000Z",
 "message": "foo"}
@AmanKrSoni
Copy link

@memwey How did you resolve this problem can you help me out with any sample example

@renatompf
Copy link

@memwey @AmanKrSoni is it possible to ignore some fields? Can you tell me how did u do it?

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

3 participants