Commit 553e47b00a3c83cc4597817d9b0eb4b2dddcafb8
1 parent
54afda6b
Use logger chatter for print() method.
Showing
1 changed file
with
7 additions
and
2 deletions
src/base/GBase.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GBase.cpp - GammaLib base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2012-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -51,6 +51,8 @@ |
| 51 | 51 | * |
| 52 | 52 | * @param[in] os Output stream. |
| 53 | 53 | * @param[in] base Object. |
| 54 | + * | |
| 55 | + * Put @p base object into output stream. | |
| 54 | 56 | ***************************************************************************/ |
| 55 | 57 | std::ostream& operator<<(std::ostream& os, const GBase& base) |
| 56 | 58 | { |
| ... | ... | @@ -67,11 +69,14 @@ std::ostream& operator<<(std::ostream& os, const GBase& base) |
| 67 | 69 | * |
| 68 | 70 | * @param[in] log Logger. |
| 69 | 71 | * @param[in] base Object. |
| 72 | + * | |
| 73 | + * Put @p base object into logger. The chattiness of the @p base object is | |
| 74 | + * controlled by the chatter() attribute of the @p log logger. | |
| 70 | 75 | ***************************************************************************/ |
| 71 | 76 | GLog& operator<<(GLog& log, const GBase& base) |
| 72 | 77 | { |
| 73 | 78 | // Write class into logger |
| 74 | - log << base.print(); | |
| 79 | + log << base.print(log.chatter()); | |
| 75 | 80 | |
| 76 | 81 | // Return logger |
| 77 | 82 | return log; | ... | ... |