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

ssh, docker: set log level to trace when in development #2099

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

gessecarneiro
Copy link
Contributor

No description provided.

@gessecarneiro gessecarneiro added kind/feature New feature or request status/needs-review go Pull requests that update Go code docker Pull requests that update Docker code labels Aug 26, 2022
@gessecarneiro gessecarneiro self-assigned this Aug 26, 2022
@@ -22,6 +23,13 @@ const (
)

func main() {
if value, ok := os.LookupEnv("SHELLHUB_ENV"); ok && value == "development" {
log.SetLevel(log.TraceLevel)
log.Debug("Log level set to Trace")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you are enabling the trace log level, this could use Trace.

@@ -22,6 +23,13 @@ const (
)

func main() {
if value, ok := os.LookupEnv("SHELLHUB_ENV"); ok && value == "development" {
log.SetLevel(log.TraceLevel)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One aspect to consider is if we should allow setting the log level directly. Even in production, putting it to trace may help when debugging issues.

@gustavosbarreto gustavosbarreto merged commit c9e8682 into master Aug 29, 2022
@gustavosbarreto gustavosbarreto deleted the feature/setDebugLevel branch August 29, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code go Pull requests that update Go code kind/feature New feature or request status/needs-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants