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

Defining a StdLogger interface to allow setting of any logger #15

Merged
merged 2 commits into from
Feb 19, 2017

Conversation

dcarbone
Copy link
Contributor

@dcarbone dcarbone commented Feb 17, 2017

We have a use-case where we'd like to be able to specify a custom logger for TrapServer to write to in the event of an error that is not an instance of the built-in log.Logger struct.

There was also a missing %s on line 43 in server.go, not sure if the syntax is OK for you but I've added it anyway.

Comments welcome.

@dcarbone
Copy link
Contributor Author

It may also be nice to add an ErrorLog field to the ServerArguments struct.

@k-sone
Copy link
Owner

k-sone commented Feb 18, 2017

Thank you for sending a pull request.

I think that the following functions are enough.

	Print(v ...interface{})
	Printf(format string, v ...interface{})

It is because other functions(FatalX and PanicX) are not used.

@k-sone
Copy link
Owner

k-sone commented Feb 18, 2017

There was also a missing %s on line 43 in server.go, not sure if the syntax is OK for you but I've added it anyway.

Thanks! 😄

@dcarbone
Copy link
Contributor Author

Done and done :)

@k-sone k-sone merged commit f35205e into k-sone:master Feb 19, 2017
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.

2 participants