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

Timestamps missing in system logs #865

Open
surapuramakhil opened this issue Mar 20, 2024 · 7 comments
Open

Timestamps missing in system logs #865

surapuramakhil opened this issue Mar 20, 2024 · 7 comments
Labels
enhancement Enhancement request

Comments

@surapuramakhil
Copy link
Contributor

Is your enhancement request related to a problem? Please describe

Timestamps missing in system logs. I am completely clueless when these logs have generated.

root@400883:~# docker logs c53f412936e7
[upload-dir] try to install...
[upload-dir] install success, upload directory is /data/uploads
[i18n] try to install i18n bundle...
[i18n] find i18n bundle 42
install all initial environment done

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

@surapuramakhil surapuramakhil added the enhancement Enhancement request label Mar 20, 2024
@calmdev
Copy link

calmdev commented Mar 21, 2024

Running Answer on Kubernetes there are timestamps:

/workspace # kubectl logs deployment/godev --timestamps=true
Found 2 pods, using pod/godev-64f6b8dcff-6bwwc
2024-03-18T15:46:14.238135024Z [upload-dir] try to install...
2024-03-18T15:46:14.247511802Z [upload-dir] install success, upload directory is /mnt/godev-data/answer-data/uploads
2024-03-18T15:46:14.247556827Z [i18n] try to install i18n bundle...
2024-03-18T15:46:14.248001557Z [i18n] find i18n bundle 42
2024-03-18T15:46:14.274951861Z install all initial environment done
2024-03-18T15:46:14.275375071Z config file exists, try to read the config...
2024-03-18T15:46:14.276660331Z config file read successfully, try to connect database...
2024-03-18T15:46:14.329487226Z connect to database successfully and table already exists, do nothing.

Have you tried using the timestamps flag with the docker logs command?

@LinkinStars
Copy link
Member

@surapuramakhil Console output was used during installation instead of log files, so it may be different than when running.

@surapuramakhil
Copy link
Contributor Author

@LinkinStars Can you please Ellobrate.

Can you also share docs about log files, like where I can find log files of this project (In various different Environments)

@LinkinStars
Copy link
Member

@LinkinStars Can you please Ellobrate.

Can you also share docs about log files, like where I can find log files of this project (In various different Environments)

You can set the location of the log file through environment variables.

FYI: https://answer.apache.org/docs/env#log

@surapuramakhil
Copy link
Contributor Author

Ah, @LinkinStars! Default value for LOG_PATH is missing. Behavior when it's not configured

@LinkinStars
Copy link
Member

Ah, @LinkinStars! Default value for LOG_PATH is missing. Behavior when it's not configured

@surapuramakhil So by default, there won't be any log files unless the user configures the LOG_PATH.

@surapuramakhil
Copy link
Contributor Author

So what I was sharing was actually console output, and these are not logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants