Skip to main content
deleted 1 character in body
Source Link
Rietty
  • 375
  • 1
  • 2
  • 8
  1. Is my code thread safe? If not, how do I make it thread safe?

  2. Is there a way to make the interface a bit cleaner for use? Right now # define#define feels a bit hacky.

  3. Is there a way to avoid the use of a global unique_ptr?

  4. Should I just make it a header only library? Is there any benefits in doing so?

  1. Is my code thread safe? If not, how do I make it thread safe?

  2. Is there a way to make the interface a bit cleaner for use? Right now # define feels a bit hacky.

  3. Is there a way to avoid the use of a global unique_ptr?

  4. Should I just make it a header only library? Is there any benefits in doing so?

  1. Is my code thread safe? If not, how do I make it thread safe?

  2. Is there a way to make the interface a bit cleaner for use? Right now #define feels a bit hacky.

  3. Is there a way to avoid the use of a global unique_ptr?

  4. Should I just make it a header only library? Is there any benefits in doing so?

edited tags
Link
200_success
  • 144.2k
  • 22
  • 188
  • 473
deleted 132 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

So, I've been programming for what is a probably a little bit and made a very simple logging system for my personal projects. While it works out fairly well so far, I would like advice on how to make it perform better and stuff I can do to make it more usable in general.

  1. Is my code thread safe? If not, how do I make it thread safe?
  1. Is there a way to make the interface a bit cleaner for use? Right now # define feels a bit hacky.
  1. Is there a way to avoid the use of a global unique_ptr?
  1. Should I just make it a header only library? Is there any benefits in doing so?
  1. Is my code thread safe? If not, how do I make it thread safe?

  2. Is there a way to make the interface a bit cleaner for use? Right now # define feels a bit hacky.

  3. Is there a way to avoid the use of a global unique_ptr?

  4. Should I just make it a header only library? Is there any benefits in doing so?

In addition to this I would appreciate any other advice on how to improve the system.

Code as it is now:

HPPhpp:

CPP.cpp:

Thanks!

So, I've been programming for what is a probably a little bit and made a very simple logging system for my personal projects. While it works out fairly well so far, I would like advice on how to make it perform better and stuff I can do to make it more usable in general.

  1. Is my code thread safe? If not, how do I make it thread safe?
  1. Is there a way to make the interface a bit cleaner for use? Right now # define feels a bit hacky.
  1. Is there a way to avoid the use of a global unique_ptr?
  1. Should I just make it a header only library? Is there any benefits in doing so?

In addition to this I would appreciate any other advice on how to improve the system.

Code as it is now:

HPP:

CPP:

Thanks!

I've been programming for what is a probably a little bit and made a very simple logging system for my personal projects. While it works out fairly well so far, I would like advice on how to make it perform better and stuff I can do to make it more usable in general.

  1. Is my code thread safe? If not, how do I make it thread safe?

  2. Is there a way to make the interface a bit cleaner for use? Right now # define feels a bit hacky.

  3. Is there a way to avoid the use of a global unique_ptr?

  4. Should I just make it a header only library? Is there any benefits in doing so?

.hpp:

.cpp:

Source Link
Rietty
  • 375
  • 1
  • 2
  • 8
Loading