http://bugzilla.moblin.org/show_bug.cgi?id=5041
--- Comment #7 from yongsheng zhu <[email protected]> 2010-03-18 01:27:05 PST --- > I think I meant something like INFO/ERROR. Instead of inserting those into a > character data stream, the data sent to the client for formatting should be > similar to what our logging code gets. Then for "normal" output we need > something that says "don't add any prefix". Since now Cmdline uses 'operator <<' to output text, to decrease changes, I'd like to define a new class passed to Cmdline: class CmdlineOStream : public ostream { void setLevel(Level level); }; //Cmdline constructor Cmdline(int argc, const char * const *argv, CmdlineOStream &out) If a level is set, then the output text through this ostream is unless the level is changed. This could avoid many changes in Cmdline class. However, this method gives the user to decide where to put output(output on the console, log into the top logger of loggers stack). > Instead of cout, a custom stream which passes the data into our logging system > with a suitable tag that reproduces the output verbatim on the console and > logs > it in the normal log should be used. Command line won't use the log file 'syncevolution-log.html' only when a session is started. you want to change this? > Logging into the file would be done inside the engine, not at the recipient. it seems inconsistent. I understand the custom stream is passed by invokers and in charge of reproduces output on the console and log it in the log in the first paragraph. > Yes. This is required for example for "synccompare". We already do that for > stderr. so redirecting stdout to '/dev/null' like stderr processing for "synccompare" is enough? -- Configure bugmail: http://bugzilla.moblin.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug. _______________________________________________ Syncevolution-issues mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution-issues
