Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
Logging Best Practices

Logging Best Practices

Posted on December 15, 2021November 29, 2023 by Toma Velev

In the list of  Logging best practices is to have the possibility to detect different events and situations in a software system. When such modules are installed, finding what is important could be completed even while the application is running and without stopping it.

Logging – On/Off Switch

It is a good practice to be able to disable the action tracing functionality for the time when everything is working perfectly. Sometimes this may boost the performance of the application. Many logging systems pass the values external channels and this increases the I/O operations.

DRY or not to DRY?

One of the ideas in programming is don’t repeat yourself. But too often it is good idea to implement yourself the basic interfaces for capsulation what you use beneath. This is one of the best practices of spring framework – coding with interfaces. This way you could swap an implementation of some library without the need to change the whole other application. This is called loose coupling.

Unfortunately there was a bug found in the log4j library, that if I correctly crafted message is passed it’s quickly to execution of uncontrolled executable file. If applications have an off switch – logging could be disabled until they are updated. If the usage is capsulated – the change may be in one place.

Environments

Having different level of logging, depending on the environment where the application is running. On Development environment – you’ll most likely want more details. On production – it is – sometimes a Privacy & Security Issue – so the logging is for more critical situations.

Configure Levels of Tracing

Most of the times the level of tracing is configured per installation basis. It is a rare to see a software runtime – updateable configuration of how much logging should an application execute.

  • It is a good idea to have time based log separation. Sometimes when nothing critical or significant has happened the system could delete the old works and clean up system storage.
  • It is considered generally a good idea to be able to trace the actions of an application through different channels and on different levels.

Images Used from https://pixabay.com/illustrations/best-practice-process-business-best-1078383/

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (84)
    • Flutter Apps (24)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Jenkins SCP File Upload to Remote Server
  • Essential Programming Books – Principles & Flutter
  • Social Media Platforms 🌍
  • Strategies to prevent review regressions
  • How to set Google Map Theme in a Flutter App

Post Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (269)
  • Graphical User Interface (14)
  • Marketing (117)
  • Software Development (286)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (15)