Closed zeroXten closed 9 years ago
This has been started now, using seelog. Need to choose some sort of default logger.
Yea, for the default logger, I don't think there is a way to initialize a logging interface directly, but we can do it from string, so we could embed some default config in a constant and then in the init() function (where I am setting the logger to seelog.Disabled right now), we can initialize the logger global variable from the string.
Makes sense. It should probably log to STDERR, up to and including INFO by default using a fairly clean format. Perhaps no timestamp.
Okay. That's simple enough. No debug logging by default then?
On Tue, Jan 27, 2015, 3:55 PM Fraser Scott notifications@github.com wrote:
Makes sense. It should probably log to STDERR, up to and including INFO by default using a fairly clean format. Perhaps no timestamp.
— Reply to this email directly or view it on GitHub https://github.com/pki-io/admin/issues/3#issuecomment-71754630.
Also, do we want anything fancy for defaults, such as rolling file? File archiving? For that matter do we want to enable files by default at all or just console output?
On Tue, Jan 27, 2015, 6:19 PM Jon Bonazza jonbonazza@gmail.com wrote:
Okay. That's simple enough. No debug logging by default then?
On Tue, Jan 27, 2015, 3:55 PM Fraser Scott notifications@github.com wrote:
Makes sense. It should probably log to STDERR, up to and including INFO by default using a fairly clean format. Perhaps no timestamp.
— Reply to this email directly or view it on GitHub https://github.com/pki-io/admin/issues/3#issuecomment-71754630.
I would vote for a timestamp
Fair enough, keep it in. This is just for default, running a command output. Like running apt, vagrant, openssl etc.
I think for default we should treat it like a command output like Fraser mentioned. So no timestamp or log level display. It would be the same as if we were just doing fmt.Println().
Then they can override with their own formats and rolling files and archiving, etc..
On Wed Jan 28 2015 at 4:52:07 AM Fraser Scott notifications@github.com wrote:
Fair enough, keep it in. This is just for default, running a command output. Like running apt, vagrant, openssl etc.
— Reply to this email directly or view it on GitHub https://github.com/pki-io/admin/issues/3#issuecomment-71830052.
Ok, no timestamp then, given eventually it will be an API client.
This is in place now with nice default logging.
Need to look at nice logging packages (or built in?) and choose one for CLI. Presume packages will continue to just return an error with fmt.Errorf() but at the moment we've just been doing panic() in the CLI.