Skip to content

Logging solution #9

Open
pan261 opened this issue Nov 18, 2021 · 3 comments
Open

Logging solution #9

pan261 opened this issue Nov 18, 2021 · 3 comments
Assignees
Labels
feature New feature or request long term Not an issue for now, but will be for later

Comments

@pan261
Copy link
Contributor

pan261 commented Nov 18, 2021

On top of graylog, we probably want an internal logger that has a bit more customization than console.log()

@pan261
Copy link
Contributor Author

pan261 commented Nov 30, 2021

We can have more detailed logs in a log file, while outputting simple logs in the console

@pan261 pan261 added the long term Not an issue for now, but will be for later label Feb 2, 2022
@pan261 pan261 self-assigned this Feb 14, 2022
@pan261 pan261 added the feature New feature or request label Feb 14, 2022
@pan261
Copy link
Contributor Author

pan261 commented Feb 14, 2022

Using winston js as our logger, with outputs to both console and a log file.

Notes:

  • To use the logger, use logger.info('message', {object})
    • logger.info can be replaced with logger.warn, logger.error, or logger.debug
    • Formatting of messages should be "file: log message"
      • winston does not get caller function name or file name for performance reasons, so we just manually prepend the filename for all logs.
    • The object can be any object, a response, error, etc.

TODO:
connect to graylog

@pan261
Copy link
Contributor Author

pan261 commented Mar 10, 2022

Winston logging is done, we will probably not want to send all of the logs to graylog, so we need to figure out which logs we want to send

Sign in to join this conversation on GitHub.
Labels
feature New feature or request long term Not an issue for now, but will be for later
Projects
None yet
Development

No branches or pull requests

1 participant