chiradeep / go-nitro

A Golang client to the Citrix ADC API
Apache License 2.0
18 stars 21 forks source link

Printing the headers prints out the password #46

Closed jovandeginste closed 3 years ago

jovandeginste commented 3 years ago

Since this change, the password used to connect (eg. through the env var) is now printed in the logs.

jantytgat commented 3 years ago

Chiming in, is there a reason why the library is printing to the console/log? Can this be disabled? I don't want any output from a library messing up my console application.

jovandeginste commented 3 years ago

Ideally, this is configuration (set a logger when creating a client)

jantytgat commented 3 years ago

Shouldn't it be deactivated at all times, thus no logging except through error handling to indicate something is wrong?

I removed all log interfaces and still it prints through fmt.Println(), which doesn't seem like a good idea?

jovandeginste commented 3 years ago

I don't mind customizable logging through a known library such as logsrus. This allows disabling by default, or enabling per level (error, warn, etc). I don't want my password to be printed out by default, such as is now the case. The verbosity as it is now, is annoying in any project where I use this library, but turning prints off completely makes errors invisible...