Sign in to follow this  
Thaligar

(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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this