(chicken-egg) ? (egg-chicken)

Started by
4 comments, last by Thaligar 18 years, 9 months ago
hey, i've got once more a problem, what shall i do first, the error handlig class, or the logging class, but if an error occurs in the logging class i need the error class, and vice versa, if i wanna log an error i need the looging class?? thx in advance tgar
Advertisement
Logging class. If errors happen in your logging class that requires your error class, you have some something terribly wrong! Actually you do not need to write a new logging system because you can use one already made that is error free, thus allowing you to do your error system. Fluid Studio's Logger Library. Just a suggestion though [wink] Using it is quite easy:

// Add logger.cpp to your project workspace#include "logger.h"void main(){   LOG("This is a log test!");}
You probably don't want very sophisiticated error handling for the log class. But you can develop the error class first and test it with other classes. Then build the log class, using the error class. Then add logging to the error class (intermediately log to the console or so).

Greetz,

Illco
Simple! Ignore errors in your logging class.

Do not introduce a cycle. You can have it one way or the other, but not both.
If you absolutely need the errors logged you'll have to make damn sure that it will succeed beforehand.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Don't get caught up in that sort of debate. I would suggest making a logging class first. Don't introduce too much complexity into your class so that the possibility of errors is at a minimum, and have it handle its own errors (such as cannot open file, &c.).
IMHO only.


jfl.
thx for the answers,

makes sense to make the logging class as simple as possible (without errors ;))

best regards
tgar

This topic is closed to new replies.

Advertisement