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

miscellaneous fixes #363

Merged
merged 16 commits into from
Nov 25, 2014
Merged

miscellaneous fixes #363

merged 16 commits into from
Nov 25, 2014

Conversation

btc
Copy link
Contributor

@btc btc commented Nov 18, 2014

This is a shared branch containing improvements too small for individual PRs.

Feel free to push to it. It'll be merged before the end of the week.

@btc btc added the status/in-progress In progress label Nov 18, 2014
@btc btc added codereview and removed status/in-progress In progress labels Nov 24, 2014
Brian Tiger Chow and others added 16 commits November 25, 2014 06:12
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
The splitter is simplified using io.ReadFull, as this function
does exactly what we wanted.

I believe io.ErrUnexpectedEOF should be handled as an EOF here,
but please correct me if I'm wrong.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

fix(eventlog) compilation error

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
+ netmessage is now loggable

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@btc
Copy link
Contributor Author

btc commented Nov 25, 2014

@jbenet @whyrusleeping LGTU?

@whyrusleeping
Copy link
Member

yeah LGTM

)

const IpnsValidatorTag = "ipns"

var log = u.Logger("core")
var log = eventlog.Logger("core")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get to completely removing these .Logger(...) lines (i.e. import eventlog as log and use it directly?)? can eventlog grab the package name? (or even the filepath?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what the best path is, but this var log = pkg.Logger(..) thing isn't adding much

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventlog cannot grab the package name.

but this var log = pkg.Logger(..) thing isn't adding much

the package name... it adds precisely that. I haven't yet found a simple way to achieve this by other means.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could write some SUPER ugly reflection code that grabs the call stack, analyses the caller function and queries which package its in... Other than that we are stuck with this approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're referring to runtme.FuncForPC, it's not possible to get the package name.

@jbenet
Copy link
Member

jbenet commented Nov 25, 2014

👍 LGTM. RTM

btc pushed a commit that referenced this pull request Nov 25, 2014
@btc btc merged commit bad4db3 into master Nov 25, 2014
@btc btc removed the codereview label Nov 25, 2014
@btc btc deleted the misc/2014-10-2X branch November 25, 2014 23:57
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

Successfully merging this pull request may close these issues.

4 participants