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

Add timestamps to tusd log #276

Merged
merged 3 commits into from
Jun 2, 2019
Merged

Conversation

jjrodrig
Copy link
Contributor

This PR adds timestamps to tusd logger.

The following line is modified https://github.com/tus/tusd/blob/master/config.go#L50 by setting the timestamp flags to the Log config

 if config.Logger == nil {
	config.Logger = log.New(os.Stdout, "[tusd] ", log.Ldate | log.Lmicroseconds)
 }

Flags log.Ldate | log.Lmicroseconds are used producing this kind of log line

 [tusd] 2019/05/24 11:39:18.827952 event="RequestIncoming" method="HEAD" path="..."

Closes #274

@Acconut Acconut merged commit 10e0bb1 into tus:master Jun 2, 2019
@Acconut
Copy link
Member

Acconut commented Jun 2, 2019

Thank you very much 👍

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.

It is possible to add timestamp info to tusd log?
2 participants