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

Print the line number of message with lager #34

Closed
qibobo opened this issue Oct 8, 2018 · 3 comments
Closed

Print the line number of message with lager #34

qibobo opened this issue Oct 8, 2018 · 3 comments
Labels

Comments

@qibobo
Copy link

qibobo commented Oct 8, 2018

When use lager to do logging, it print out a json format message. There is no line number where the log message was triggered. Does lager support it? Or how can I do it with lager?

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/161044023

The labels on this github issue will be updated when the story is started.

@jvshahid
Copy link
Contributor

No, you can't print the file:line where the log was triggered that today. We (the diego team) usually have a message that is distinguishable enough, either by itself or because it has a session prefix to identify where it came from. I honestly haven't felt the need for file:line but I'm happy to hear your thoughts. First, I would recommend making use of Session to nest sessions and add a prefix to the log message.

@qibobo
Copy link
Author

qibobo commented Oct 15, 2018

@jvshahid Sounds reasonable. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants