apache / incubator-answer

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

Home Page:https://answer.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timestamps missing in system logs

surapuramakhil opened this issue · comments

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.

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?

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

@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 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

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

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.

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