# (chicken-egg) ? (egg-chicken)

## Recommended Posts

Thaligar    142
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

##### Share on other sites
Drew_Benton    1861
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!");}

##### Share on other sites
Illco    928
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

##### Share on other sites
iMalc    2466
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.

##### Share on other sites
jflanglois    1020
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.

##### Share on other sites
Thaligar    142

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

best regards
tgar