| View previous topic :: View next topic |
| Author |
Message |
Marco Costalba
Joined: 14 Jun 2008 Posts: 2097
|
Post subject: Re: A logging facility Posted: Mon Mar 19, 2012 8:00 am |
|
|
| Rein Halbersma wrote: |
| What is really nice in your code is that your Logger class can toggle this behavior at runtime and *from the outside*, as you point out. |
Thanks Rein, and if you have noted housekeeping is guaranteed even at destruction: here the trick is to declare the object static inside a function and upon destruction (exiting from main()) the object _always_ restores the original cout buffer, this is important in case there are other static objects that call std::cout in the d'tor and are freed after the logger. |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
A logging facility |
Marco Costalba |
Sun Mar 18, 2012 10:23 pm |
Re: A logging facility |
Gary |
Sun Mar 18, 2012 11:56 pm |
Re: A logging facility |
Robert Hyatt |
Mon Mar 19, 2012 3:50 am |
Re: A logging facility |
Marco Costalba |
Mon Mar 19, 2012 7:18 am |
Re: A logging facility |
Vincent Diepeveen |
Mon Mar 19, 2012 7:37 am |
Re: A logging facility |
Marco Costalba |
Mon Mar 19, 2012 7:50 am |
Re: A logging facility |
Vincent Diepeveen |
Mon Mar 19, 2012 8:22 am |
Re: A logging facility |
Jan Brouwer |
Mon Mar 19, 2012 6:43 pm |
Re: A logging facility |
Robert Hyatt |
Mon Mar 19, 2012 6:54 pm |
Re: A logging facility |
Jan Brouwer |
Mon Mar 19, 2012 8:00 pm |
Re: A logging facility |
Marco Costalba |
Mon Mar 19, 2012 9:09 pm |
Re: A logging facility |
Daniel Shawul |
Mon Mar 19, 2012 9:37 pm |
Re: A logging facility |
Marco Costalba |
Tue Mar 20, 2012 8:30 pm |
Re: A logging facility |
Ben-Hur Carlos Langoni |
Wed Mar 21, 2012 2:16 am |
Re: A logging facility |
Daniel Shawul |
Wed Mar 21, 2012 9:20 am |
Re: A logging facility |
Ben-Hur Carlos Langoni |
Wed Mar 21, 2012 1:54 pm |
Re: A logging facility |
Daniel Shawul |
Wed Mar 21, 2012 3:38 pm |
Re: A logging facility |
Marco Costalba |
Thu Mar 22, 2012 8:01 pm |
Re: A logging facility |
Daniel Shawul |
Thu Mar 22, 2012 10:48 pm |
Re: A logging facility |
Rein Halbersma |
Fri Mar 23, 2012 7:03 am |
Re: A logging facility |
Daniel Shawul |
Fri Mar 23, 2012 10:04 am |
Re: A logging facility |
Rein Halbersma |
Fri Mar 23, 2012 12:32 pm |
Re: A logging facility |
Martin Sedlak |
Fri Mar 23, 2012 1:00 pm |
Re: A logging facility |
Daniel Shawul |
Fri Mar 23, 2012 2:05 pm |
Re: A logging facility |
Robert Hyatt |
Wed Mar 21, 2012 4:36 pm |
Re: A logging facility |
Mark Pearce |
Wed Mar 28, 2012 12:49 pm |
Re: A logging facility |
Rein Halbersma |
Mon Mar 19, 2012 7:50 am |
Re: A logging facility |
Marco Costalba |
Mon Mar 19, 2012 8:00 am |
Re: A logging facility |
Rein Halbersma |
Mon Mar 19, 2012 8:09 am |
Re: A logging facility |
Robert Hyatt |
Mon Mar 19, 2012 6:56 pm |
Re: A logging facility |
Daniel Shawul |
Mon Mar 19, 2012 7:52 pm |
Re: A logging facility |
Robert Hyatt |
Wed Mar 21, 2012 1:26 am |
Re: A logging facility |
Daniel Shawul |
Wed Mar 21, 2012 9:00 am |
Re: A logging facility |
H.G.Muller |
Wed Mar 21, 2012 7:58 am |
Re: A logging facility |
Vincent Diepeveen |
Wed Mar 21, 2012 2:39 pm |
Re: A logging facility |
H.G.Muller |
Wed Mar 21, 2012 5:29 pm |
Re: A logging facility |
H.G.Muller |
Thu Mar 22, 2012 8:11 am |
Re: A logging facility |
Daniel Shawul |
Thu Mar 22, 2012 11:18 pm |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|