BEOpenSourceCollabs / EventManagementCore

Event management system collaboration project for the Backend Engineering discord.
Apache License 2.0
3 stars 1 forks source link

improve logging #37

Closed awpt1mus closed 3 months ago

awpt1mus commented 3 months ago
  1. Currently the logger is global better to use injection.

  2. A typical logger has following levels,

    • Info - prints general info
    • warn - prints warnings
    • error - prints error / error messages
    • debug - prints messages useful for debugging
    • fatal - prints fatar error messages before crashing the process.

When application is bootstrapped it may configure the logger to only log messages that are error / fatal (common in production) or log everything (development / test environments).

current logger implementation lacks this ability.

  1. Current logger is only able to log the text message to stdout , typically in production environment a structured message format is used such as JSON. Logger could implement ability to log text or json to stdout depending on configuration.