common logging/tracing package for go servers
API documentation: https://godoc.org/gopkg.in/tokopedia/logging.v1
common Go logging
common logging/tracing package for go servers
API documentation: https://godoc.org/gopkg.in/tokopedia/logging.v1
I tried to visit the docs : https://godoc.org/gopkg.in/tokopedia.com/logging.v1 but not found.
I was kinda curious what's the different between package log in go and this one?
To start from my understanding, it seems that tokopedia/logging
tries to define its own buildhash
build time info to get build information
Line 36 in 41f21cd
Lines 60 to 63 in 41f21cd
Lines 1 to 7 in 41f21cd
This won't work, since buildhash
is injected during build time, so it could only be used on package main
as per build_debian_package
roles
https://github.com/tokopedia/ansible-v2/blob/26ac51e1695816ad771b9e75c945cdda76e5313a/roles/build_debian_package/templates/debian-rules-file.j2#L77
When we use socketmaster- the SIGHUP is sent to the socketmaster binary, which then forks a new child process. It then sends a SIGTERM to the old process. So the rotation code is never executed, because SIGHUP is never sent.
Thats not it - for some reason, the newly started binary actually has the wrong file opened as stderr, so the error logs keep going to the old file.
The solution could be to modify socketmaster, to use -USR1 signal for restarting the process, and making the -HUP passthrough, but there is still a problem.How do we indicate to upstart when we want an app reload and when we intend only a logrotation.
We couldn't use socketmaster reload for logrotate, this is caused by 1 and 2 fd is not closed since the fact that the main process (which is socketmaster) doesn't get terminated.
Socketmaster will send SIGTERM to the app on reload (SIGHUP to socketmaster), then we can add handler to close the 1 and 2 fd at that time.
So we don't have to restart the app every log rotate.
Do you think it's possible?
(still in the long week end vacation, will take a look by myself at monday)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.