Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

logging facilities for realtime and non realtime applications

We're developing both std and realtime applications that run on a RT-Linux. question is, what would be an efficient way of logging application traces from both realtime and non-realtime processes?

By effecient, I mean that the process of logging application traces shouldn't cause RT-perf hit by increasing latency, etc.

Traces should ideally be stored into a single file with timestamp, to make it easier to track interaction between processes.

like image 926
fduff Avatar asked Jan 23 '13 21:01

fduff


People also ask

Why is logging important in applications?

Application logging is a critical part of log management and can help keep your business running smoothly and securely. Application logging is the process of saving application events. With this information in hand, tech pros can assess threats and analyze errors before they disrupt broader business workflows.

Which of the following is an example for the purpose of logging and monitoring?

Logging and monitoring are both valuable components to maintaining optimal application performance. Using a combination of logging tools and real-time monitoring systems helps improve observability and reduces the time spent sifting through log files to determine the root cause of performance problems.

What is logging system?

The purpose of the logging system is to provide the user with facilities to log information and to. retrieve it later on. The logging system supports two kinds of log: Normal Logs. These logs are used to log information related to operative conditions.


2 Answers

For real time Logging I'll advise use different aproaches than bare logging to files. Writing to files a lot of information will hurt your performance.

I can advice other more lighter mechanismS:

  • Use statistics/counters to get filling what your application is doing
  • Write/encode logs in some binary format to be processed offline. This binary format may be more compact and thus lighter.
like image 109
dimba Avatar answered Oct 07 '22 09:10

dimba


Since you are on linux, you can use syslog() :

openlog() opens a connection to the system logger for a program.

this means your program forwards messages to another program, which can be of low priority.

If you want something more fancy, then boost logging.

like image 36
BЈовић Avatar answered Oct 07 '22 07:10

BЈовић